int (final Change o1, final Change o2) { final SvnRepositoryContentRevision after1 = (SvnRepositoryContentRevision) o1.getAfterRevision(); final SvnRepositoryContentRevision after2 = (SvnRepositoryContentRevision) o2.getAfterRevision(); // "delete" changes to the end if (after1 == null) { return 1; } if (after2 == null) { return -1; } final String path1 = after1.getFullPath(); final String path2 = after2.getFullPath(); final String ancestor = Url.getCommonAncestor(path1, path2); return path1.equals(ancestor) ? -1 : 1; }