File propertiesFile = getAdminFile("all-wcprops");
if (!propertiesFile.exists()) {
return wcPropsCache;
}
FSFile wcpropsFile = null;
try {
wcpropsFile = new FSFile(propertiesFile);
SVNProperties wcProps = wcpropsFile.readProperties(false, true);
SVNVersionedProperties entryWCProps = new SVNProperties13(wcProps);
wcPropsCache.put(getThisDirName(), entryWCProps);
String name = null;
StringBuffer buffer = new StringBuffer();
while(true) {
try {
name = wcpropsFile.readLine(buffer);
} catch (SVNException e) {
if (e.getErrorMessage().getErrorCode() == SVNErrorCode.STREAM_UNEXPECTED_EOF && buffer.length() > 0) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Missing end of line in wcprops file for ''{0}''", getRoot());
SVNErrorManager.error(err, e, SVNLogType.WC);
}
break;
}
wcProps = wcpropsFile.readProperties(false, true);
entryWCProps = new SVNProperties13(wcProps);
wcPropsCache.put(name, entryWCProps);
buffer.delete(0, buffer.length());
}
} catch (SVNException svne) {
SVNErrorMessage err = svne.getErrorMessage().wrap("Failed to load properties from disk");
SVNErrorManager.error(err, SVNLogType.DEFAULT);
} finally {
wcpropsFile.close();
}
return wcPropsCache;
}