public static final String HEADER_FORWARDHOST = "X-Forwarded-Host";
public static long getSafeCreatedRevision(FSRevisionRoot root, String path) {
long revision = root.getRevision();
FSFS fsfs = root.getOwner();
FSID id = null;
try {
FSRevisionNode node = root.getRevisionNode(path);
id = node.getId();
} catch (SVNException svne) {
return revision;
}
FSNodeHistory history = null;
long historyRev = -1;
try {
history = root.getNodeHistory(path);
history = history.getPreviousHistory(false);
historyRev = history.getHistoryEntry().getRevision();
} catch (SVNException svne) {
return revision;
}
FSRevisionRoot otherRoot = null;
try {
otherRoot = fsfs.createRevisionRoot(historyRev);
} catch (SVNException svne) {
return revision;
}
FSID otherID = null;
try {
FSRevisionNode node = otherRoot.getRevisionNode(path);
otherID = node.getId();
} catch (SVNException svne) {
return revision;