protected SVNNodeKind getNodeKind() throws SVNException { if (myKind == null) { myKind = myRepos.checkPath(myRepositoryPath, myRevision1); } return myKind; }
public static final boolean isFile(SVNRepository repository, String filePath) throws SVNException { SVNNodeKind nodeKind = repository.checkPath(filePath, -1); boolean isFile = true; if (nodeKind == SVNNodeKind.NONE) { System.err.println("There is no entry "); isFile = false; } else if (nodeKind == SVNNodeKind.DIR) { isFile = false; System.err.println("The entry is a directory while a file was expected."); } return isFile; }
public boolean exists(long revision) throws SVNException { SVNNodeKind kind; kind = root.getRepository().checkPath(path, revision); return kind == SVNNodeKind.FILE || kind == SVNNodeKind.DIR; }
public boolean exists(long revision) throws SVNException { SVNNodeKind kind; kind = root.getRepository().checkPath(path, revision); return kind == SVNNodeKind.FILE || kind == SVNNodeKind.DIR; }
/** @return revision */ public long doWriteTo(long revision, OutputStream dest) throws FileNotFoundException, SVNException { SVNRepository repository; repository = root.getRepository(); if (repository.checkPath(path, revision) != SVNNodeKind.FILE) { throw new FileNotFoundException("no such file: " + path + ", revision " + revision); } return repository.getFile(path, revision, null, dest); }
public void deleteEntry(String path, long revision) throws SVNException { SVNNodeKind kind = myRepository.checkPath(path, myRevision); SVNDiffStatus status = new SVNDiffStatus(new File(myAnchor, path), myRootURL.appendPath(path, false), path, SVNStatusType.STATUS_DELETED, false, kind); myHandler.handleDiffStatus(status); }
public void deleteEntry(String path, long revision) throws SVNException { if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { return; } SVNNodeKind nodeKind = myRepos.checkPath(path, myRevision1); SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true); deleteEntry(path, nodeKind, dir); }
public void deleteEntry(String path, long revision) throws SVNException { DirectoryBaton parentBaton = currentDirectory; if (parentBaton.skipChildren) { return; } SVNNodeKind kind = repository.checkPath(path, this.revision); if (kind == SVNNodeKind.FILE) { diffDeletedFile(path, parentBaton); } else if (kind == SVNNodeKind.DIR) { diffDeletedDirectory(path, parentBaton); } }
public void deleteEntry(String path, long revision) throws SVNException { if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { return; } SVNNodeKind nodeKind = myRepos.checkPath(path, myRevision1); SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true); deleteEntry(path, nodeKind, dir); }
public void deleteEntry(String path, long revision) throws SVNException { if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { return; } SVNNodeKind nodeKind = myRepos.checkPath(path, myRevision1); SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true); deleteEntry(path, nodeKind, dir); }
private void addURLParents(List targets, SVNURL url) throws SVNException { SVNURL parentURL = url.removePathTail(); SVNRepository repos = createRepository(parentURL, null, null, true); SVNNodeKind kind = repos.checkPath("", SVNRepository.INVALID_REVISION); if (kind == SVNNodeKind.NONE) { addURLParents(targets, parentURL); } targets.add(url); }
private void addURLParents(List targets, SVNURL url) throws SVNException { SVNURL parentURL = url.removePathTail(); SVNRepository repos = createRepository(parentURL, null, null, true); SVNNodeKind kind = repos.checkPath("", SVNRepository.INVALID_REVISION); if (kind == SVNNodeKind.NONE) { addURLParents(targets, parentURL); } targets.add(url); }
public void deleteEntry(String path, long revision) throws SVNException { SVNNodeKind kind = myRepository.checkPath(path, myRevision); String statusPath = getStatusPath(path); SVNDiffStatus status = new SVNDiffStatus(myAnchor != null ? new File(myAnchor, path) : null, myRootURL.appendPath(path, false), statusPath, SVNStatusType.STATUS_DELETED, false, kind); myHandler.handleDiffStatus(status); }
public long getLatestRevision() throws SVNException { List<Long> revs; SVNDirEntry dir; if (root.getRepository().checkPath(path, -1) == SVNNodeKind.DIR) { dir = root.getRepository().getDir(path, -1, false, new ArrayList<>()); return dir.getRevision(); } else { revs = getRevisions(); return revs.get(revs.size() - 1); } }
public long getLatestRevision() throws SVNException { List<Long> revs; SVNDirEntry dir; if (root.getRepository().checkPath(path, -1) == SVNNodeKind.DIR) { dir = root.getRepository().getDir(path, -1, false, new ArrayList<Object>()); return dir.getRevision(); } else { revs = getRevisions(); return revs.get(revs.size() - 1); } }
private void addURLParents(List<SVNURL> targets, SVNURL url) throws SVNException { SVNURL parentURL = url.removePathTail(); SVNRepository repository = getRepositoryAccess().createRepository(parentURL, null, true); SVNNodeKind kind = repository.checkPath("", SVNRepository.INVALID_REVISION); if (kind == SVNNodeKind.NONE) { addURLParents(targets, parentURL); } targets.add(url); } }
public void deleteEntry(String path, long revision) throws SVNException { SVNNodeKind kind = myRepository.checkPath(path, myRevision); String statusPath = getStatusPath(path); SVNDiffStatus status = new SVNDiffStatus(myAnchor != null ? new File(myAnchor, path) : null, myRootURL.appendPath(path, false), statusPath, SVNStatusType.STATUS_DELETED, false, kind); myHandler.handleDiffStatus(status); if (kind == SVNNodeKind.DIR) { diffDeletedDir(path); } }
private SVNNodeKind kind() throws ExistsException { SVNRepository repository; repository = root.getRepository(); try { return repository.checkPath(path, repository.getLatestRevision()); } catch (SVNException e) { throw new ExistsException(this, e); } }
private SVNNodeKind kind() throws ExistsException { SVNRepository repository; repository = root.getRepository(); try { return repository.checkPath(path, repository.getLatestRevision()); } catch (SVNException e) { throw new ExistsException(this, e); } }
/** @return revision */ public long doWriteTo(long revision, OutputStream dest) throws FileNotFoundException, SVNException { SVNRepository repository; repository = root.getRepository(); if (repository.checkPath(path, revision) != SVNNodeKind.FILE) { throw new FileNotFoundException(this, "no such file in revision " + revision); } return repository.getFile(path, revision, null, dest); }