public static SVNURL toURL(String url, String path) { SVNURL repoURL = toURL(url); try { return repoURL.appendPath(path, false); } catch (SVNException e) { throw new IllegalArgumentException("Cannot get SVN URL for " + path, e); } }
public FileInfo(DirectoryInfo parent, String path, boolean added) throws SVNException { myPath = getAnchor().getFile(path); myName = myPath.getName(); myParent = parent; myURL = myParent.computeURL().appendPath(myName, false); myRemoteRevision = SVNRevision.UNDEFINED; myRemoteKind = SVNNodeKind.FILE; myIsAdded = added; }
public FileInfo(DirectoryInfo parent, String path, boolean added) throws SVNException { myPath = getAnchor().getFile(path); myName = myPath.getName(); myParent = parent; myURL = myParent.computeURL().appendPath(myName, false); myRemoteRevision = SVNRevision.UNDEFINED; myRemoteKind = SVNNodeKind.FILE; myIsAdded = added; }
public SVNURL getSvnurl() { try { return root.getRepository().getLocation().appendPath(path, false); } catch (SVNException e) { throw new IllegalStateException(path, e); } }
public FileInfo(DirectoryInfo parent, String path, boolean added) throws SVNException { myPath = getAnchor().getFile(path); myName = myPath.getName(); myParent = parent; myURL = myParent.computeURL().appendPath(myName, false); myRemoteRevision = SVNRevision.UNDEFINED; myRemoteKind = SVNNodeKind.FILE; myIsAdded = added; }
public SVNURL getSvnurl() { try { return root.getRepository().getLocation().appendPath(path, false); } catch (SVNException e) { throw new IllegalStateException(path, e); } }
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); }
private SVNURL resolveRepositoryRelativeURL(SVNURL rootURL, String relativeURL) throws SVNException { if (!isReposRelative(relativeURL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_URL, "Improper relative URL ''{0}''", relativeURL); SVNErrorManager.error(err, SVNLogType.CLIENT); } relativeURL = relativeURL.substring(2); SVNURL url = rootURL.appendPath(relativeURL, true); return url; }
private SVNURL resolveRepositoryRelativeURL(SVNURL rootURL, String relativeURL) throws SVNException { if (!isReposRelative(relativeURL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_URL, "Improper relative URL ''{0}''", relativeURL); SVNErrorManager.error(err, SVNLogType.CLIENT); } relativeURL = relativeURL.substring(2); SVNURL url = rootURL.appendPath(relativeURL, true); return 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 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); } }
public long fetchFile(String path, long revision, OutputStream os, SVNProperties properties) throws SVNException { SVNURL url = reposRoot.appendPath(SVNPathUtil.removeTail(path), false); if (repos2[0] == null) { repos2[0] = createRepository(url, null, null, false); } else { repos2[0].setLocation(url, false); } return repos2[0].getFile(SVNPathUtil.tail(path), revision, properties, os); } };
public void deleteEntry(String path, long revision) throws SVNException { checkIfPathIsUnderRoot(path); String name = SVNPathUtil.tail(path); SVNURL url = SVNURL.parseURIEncoded(myCurrentDirectory.URL); SVNURL theirURL = url.appendPath(name, false); checkIfPathIsUnderRoot(path); doDeleteEntry(path, myCurrentDirectory.getAdminArea(), myCurrentDirectory, theirURL); }
public void deleteEntry(String path, long revision) throws SVNException { checkIfPathIsUnderRoot(path); String name = SVNPathUtil.tail(path); SVNURL url = SVNURL.parseURIEncoded(myCurrentDirectory.URL); SVNURL theirURL = url.appendPath(name, false); checkIfPathIsUnderRoot(path); doDeleteEntry(path, myCurrentDirectory.getAdminArea(), myCurrentDirectory, theirURL); }
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } };
private SVNRepository getRequestedRepository() throws SVNException { if (getDAVResource().getResourceURI().getPath() == null || getDAVResource().getResourceURI().getPath().length() == 0) { return getDAVResource().getRepository(); } SVNURL resourceURL = getDAVResource().getRepository().getLocation(); SVNURL resultURL = resourceURL.appendPath(getDAVResource().getResourceURI().getPath(), true); return SVNRepositoryFactory.create(resultURL); }
private void checkout(@NotNull String path, @NotNull SVNDepth depth) throws SVNException { final SvnCheckout checkout = factory.createCheckout(); checkout.setSource(SvnTarget.fromURL(server.getUrl().appendPath(path, true))); checkout.setSingleTarget(SvnTarget.fromFile(wc)); checkout.setRevision(SVNRevision.HEAD); checkout.setDepth(depth); checkout.run(); }