public int getSupportedVersion() {
return WC_FORMAT;
}
protected int doCheckWC(File path, Level logLevel) throws SVNException {
File adminDir = new Resource(path, SVNFileUtil.getAdminDirectoryName());
File entriesFile = new Resource(adminDir, "entries");
if (!entriesFile.exists()) {
return 0;
// SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Cannot read entries file ''{0}'': {1}", new Object[] {entriesFile, "This resource does not exist."});
// throw new SVNException(err);
}
int formatVersion = -1;
BufferedReader reader = null;
String line = null;
try {
reader = new BufferedReader(new InputStreamReader(SVNFileUtil.openFileForReading(entriesFile, logLevel, SVNLogType.WC), "UTF-8"));
line = reader.readLine();
} catch (FileNotFoundException e) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Cannot read entries file ''{0}'': {1}", new Object[] {entriesFile, e.getLocalizedMessage()});
throw new SVNException(err);
} catch (IOException e) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Cannot read entries file ''{0}'': {1}", new Object[] {entriesFile, e.getLocalizedMessage()});
SVNErrorManager.error(err, e, SVNLogType.WC);
} catch (SVNException svne) {
SVNFileType type = SVNFileType.getType(path);
if (type != SVNFileType.DIRECTORY || !entriesFile.exists()) {
if (type == SVNFileType.NONE) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "''{0}'' does not exist", path);
SVNErrorManager.error(err, SVNLogType.WC);
}
return 0;