private SVNPath getParentPath(SVNPath target) { return new SVNPath(SVNPathUtil.removeTail(target.getTarget()), target.getPegRevision()); }
private SVNPath getParentPath(SVNPath target) { return new SVNPath(SVNPathUtil.removeTail(target.getTarget()), target.getPegRevision()); }
String repoPath = repo.getLocation().toDecodedString().substring(repoRoot.length()); SVNPath path = new SVNPath(repoPath, true, true); SVNNodeKind svnNodeKind = repo.checkPath(path.getTarget(), path.getPegRevision().getNumber()); if (svnNodeKind != SVNNodeKind.DIR) { return FormValidation.error("Credentials looks fine but the repository URL is invalid");
private void doDiff(SVNDiffClient client, SVNLogEntry logEntry, SVNPath target, SVNDepth depth) throws SVNException { if (target.isFile()) { client.doDiff(target.getFile(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut(), getSVNEnvironment().getChangelistsCollection()); } else { client.doDiff(target.getURL(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut()); } }
private void doDiff(SVNDiffClient client, SVNLogEntry logEntry, SVNPath target, SVNDepth depth) throws SVNException { if (target.isFile()) { client.doDiff(target.getFile(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut(), getSVNEnvironment().getChangelistsCollection()); } else { client.doDiff(target.getURL(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut()); } }
dstTarget = new SVNPath(targetDir); SVNRevision pegRevision = target.getPegRevision(); if (revision == SVNRevision.UNDEFINED) { revision = pegRevision != SVNRevision.UNDEFINED ? pegRevision : SVNRevision.HEAD;
dstTarget = new SVNPath(targetDir); SVNRevision pegRevision = target.getPegRevision(); if (revision == SVNRevision.UNDEFINED) { revision = pegRevision != SVNRevision.UNDEFINED ? pegRevision : SVNRevision.HEAD;
try { if (target.isURL()) { client.doGetFileContents(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), true, getSVNEnvironment().getOut()); } else { client.doGetFileContents(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), true, getSVNEnvironment().getOut());
try { if (target.isURL()) { client.doGetFileContents(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), true, getSVNEnvironment().getOut()); } else { client.doGetFileContents(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), true, getSVNEnvironment().getOut());
SVNRevision endRev = end; if (endRev == SVNRevision.UNDEFINED) { if (target.getPegRevision() != SVNRevision.UNDEFINED) { endRev = target.getPegRevision(); client.doAnnotate(target.getFile(), target.getPegRevision(), start, endRev, getSVNEnvironment().isForce(), getSVNEnvironment().isUseMergeHistory(), this, null); } else { client.doAnnotate(target.getURL(), target.getPegRevision(), start, endRev, getSVNEnvironment().isForce(), getSVNEnvironment().isUseMergeHistory(),
sources.add(new SVNCopySource(source.getPegRevision(), getSVNEnvironment().getStartRevision(), source.getURL())); } else { sources.add(new SVNCopySource(source.getPegRevision(), getSVNEnvironment().getStartRevision(), source.getFile()));
sources.add(new SVNCopySource(source.getPegRevision(), getSVNEnvironment().getStartRevision(), source.getURL())); } else { sources.add(new SVNCopySource(source.getPegRevision(), getSVNEnvironment().getStartRevision(), source.getFile()));
client.doList(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this); } else { client.doList(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this);
client.doList(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this); } else { client.doList(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this);
SVNRevision pegRevision = from.getPegRevision(); String to; if (targets.size() == 1) {
client.doSwitch(target.getFile(), switchURL.getURL(), switchURL.getPegRevision(), getSVNEnvironment().getStartRevision(), depth, getSVNEnvironment().isForce(), depthIsSticky, ignoreAncestry);
client.doSwitch(target.getFile(), switchURL.getURL(), switchURL.getPegRevision(), getSVNEnvironment().getStartRevision(), depth, getSVNEnvironment().isForce(), depthIsSticky, ignoreAncestry);
private SVNURL checkRootURLOfTarget(SVNURL rootURL, String target) throws SVNException { SVNPath svnPath = new SVNPath(target, true); SVNWCClient client = getClientManager().getWCClient(); File path = svnPath.isFile() ? svnPath.getFile() : null; SVNURL url = svnPath.isURL() ? svnPath.getURL() : null; SVNURL tmpRootURL = null; try { tmpRootURL = client.getReposRoot(path, url, svnPath.getPegRevision()); } catch (SVNException svne) { SVNErrorMessage err = svne.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.ENTRY_NOT_FOUND || err.getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { return rootURL; } throw svne; } if (rootURL != null) { if (!rootURL.equals(tmpRootURL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET, "All non-relative targets must have the same root URL"); SVNErrorManager.error(err, SVNLogType.CLIENT); } return rootURL; } return tmpRootURL; }
private SVNURL checkRootURLOfTarget(SVNURL rootURL, String target) throws SVNException { SVNPath svnPath = new SVNPath(target, true); SVNWCClient client = getClientManager().getWCClient(); File path = svnPath.isFile() ? svnPath.getFile() : null; SVNURL url = svnPath.isURL() ? svnPath.getURL() : null; SVNURL tmpRootURL = null; try { tmpRootURL = client.getReposRoot(path, url, svnPath.getPegRevision()); } catch (SVNException svne) { SVNErrorMessage err = svne.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.ENTRY_NOT_FOUND || err.getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { return rootURL; } throw svne; } if (rootURL != null) { if (!rootURL.equals(tmpRootURL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET, "All non-relative targets must have the same root URL"); SVNErrorManager.error(err, SVNLogType.CLIENT); } return rootURL; } return tmpRootURL; }
SVNRevision pegRevision = from.getPegRevision(); String to; if (targets.size() == 1) {