Revision (@NotNull File file, @NotNull Status svnStatus) { WorkingCopyFormat format = myVcs.getWorkingCopyFormat(file); long revision = -1; // skipped for >= 1.8 if (format.less(WorkingCopyFormat.ONE_DOT_EIGHT)) { // get really latest revision // TODO: Algorithm seems not to be correct in all cases - for instance, when some subtree was deleted and replaced by other // TODO: with same names. pegRevision should be used somehow but this complicates the algorithm if (svnStatus.getRepositoryRootUrl() != null) { revision = new LatestExistentSearcher(myVcs, svnStatus.getUrl(), svnStatus.getRepositoryRootUrl()).getDeletionRevision(); } else { LOG.info("Could not find repository url for file " + file); } } return Revision.of(revision); }