public FSNodeHistory fsHistoryPrev(boolean crossCopies, FSFS owner) throws SVNException { if ("/".equals(historyEntry.getPath())) { if (!isInteresting) { return new FSNodeHistory(new SVNLocationEntry(historyEntry.getRevision(), "/"), true, new SVNLocationEntry(FSRepository.SVN_INVALID_REVNUM, null)); } else if (historyEntry.getRevision() > 0) { return new FSNodeHistory(new SVNLocationEntry(historyEntry.getRevision() - 1, "/"), true, new SVNLocationEntry(FSRepository.SVN_INVALID_REVNUM, null)); } } else { FSNodeHistory prevHist = this; while (true) { prevHist = prevHist.historyPrev(crossCopies, owner); if (prevHist == null) { return null; } if (prevHist.isInteresting) { return prevHist; } } } return null; } }
public FSNodeHistory getPreviousHistory(boolean crossCopies) throws SVNException { if ("/".equals(myHistoryEntry.getPath())) { if (!myIsInteresting) { return new FSNodeHistory(new SVNLocationEntry(myHistoryEntry.getRevision(), "/"), true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); } else if (myHistoryEntry.getRevision() > 0) { return new FSNodeHistory(new SVNLocationEntry(myHistoryEntry.getRevision() - 1, "/"), true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); } } else { FSNodeHistory prevHist = this; while (true) { prevHist = prevHist.historyPrev(crossCopies); if (prevHist == null) { return null; } if (prevHist.myIsInteresting) { return prevHist; } } } return null; } }
public FSNodeHistory getPreviousHistory(boolean crossCopies) throws SVNException { if ("/".equals(myHistoryEntry.getPath())) { if (!myIsInteresting) { return new FSNodeHistory(new SVNLocationEntry(myHistoryEntry.getRevision(), "/"), true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); } else if (myHistoryEntry.getRevision() > 0) { return new FSNodeHistory(new SVNLocationEntry(myHistoryEntry.getRevision() - 1, "/"), true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); } } else { FSNodeHistory prevHist = this; while (true) { prevHist = prevHist.historyPrev(crossCopies); if (prevHist == null) { return null; } if (prevHist.myIsInteresting) { return prevHist; } } } return null; } }
public FSNodeHistory getPreviousHistory(boolean crossCopies) throws SVNException { if ("/".equals(myHistoryEntry.getPath())) { if (!myIsInteresting) { return new FSNodeHistory(new SVNLocationEntry(myHistoryEntry.getRevision(), "/"), true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); } else if (myHistoryEntry.getRevision() > 0) { return new FSNodeHistory(new SVNLocationEntry(myHistoryEntry.getRevision() - 1, "/"), true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); } } else { FSNodeHistory prevHist = this; while (true) { prevHist = prevHist.historyPrev(crossCopies); if (prevHist == null) { return null; } if (prevHist.myIsInteresting) { return prevHist; } } } return null; } }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public static FSNodeHistory getNodeHistory(FSRevisionRoot root, String path) throws SVNException { FSRevisionNode node = null; SVNNodeKind kind = null; try { node = root.openPath(path, true, false).getRevNode(); } catch (SVNException svne) { if (svne.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_FOUND) { kind = SVNNodeKind.NONE; } throw svne; } kind = node.getType(); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(root, path)); } return new FSNodeHistory(new SVNLocationEntry(root.getRevision(), path), false, new SVNLocationEntry(FSRepository.SVN_INVALID_REVNUM, null)); }
if (revision == commitEntry.getRevision()) { if (!reported) { prevHist = new FSNodeHistory(commitEntry, true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); retry = true; return new FSNodeHistory(new SVNLocationEntry(dstRev, path), retry ? false : true, new SVNLocationEntry(srcEntry.getRevision(), srcEntry.getPath()), myFSFS); return new FSNodeHistory(commitEntry, true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS);
if (revision == commitEntry.getRevision()) { if (!reported) { prevHist = new FSNodeHistory(commitEntry, true, new SVNLocationEntry(FSRepository.SVN_INVALID_REVNUM, null)); return prevHist; retry = true; return new FSNodeHistory(new SVNLocationEntry(dstRev, path), retry ? false : true, new SVNLocationEntry(srcEntry.getRevision(), srcEntry.getPath())); return new FSNodeHistory(commitEntry, true, new SVNLocationEntry(FSRepository.SVN_INVALID_REVNUM, null));
if (revision == commitEntry.getRevision()) { if (!reported) { prevHist = new FSNodeHistory(commitEntry, true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); retry = true; return new FSNodeHistory(new SVNLocationEntry(dstRev, path), retry ? false : true, new SVNLocationEntry(srcEntry.getRevision(), srcEntry.getPath()), myFSFS); return new FSNodeHistory(commitEntry, true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS);
if (revision == commitEntry.getRevision()) { if (!reported) { prevHist = new FSNodeHistory(commitEntry, true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS); retry = true; return new FSNodeHistory(new SVNLocationEntry(dstRev, path), retry ? false : true, new SVNLocationEntry(srcEntry.getRevision(), srcEntry.getPath()), myFSFS); return new FSNodeHistory(commitEntry, true, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), myFSFS);