private String checkout(SvnOperationFactory svnOperationFactory) throws SVNException { logger.debug("Checking out " + getUri() + " to: " + getWorkingDirectory().getAbsolutePath()); final SvnCheckout checkout = svnOperationFactory.createCheckout(); checkout.setSource(SvnTarget.fromURL(SVNURL.parseURIEncoded(getUri()))); checkout.setSingleTarget(SvnTarget.fromFile(getWorkingDirectory())); Long id = checkout.run(); if (id == null) { return null; } return id.toString(); }
public static SVNURL toURL(String path) { try { return SVNURL.parseURIEncoded(path); } catch (SVNException e) { throw new IllegalArgumentException("Cannot get SVN URL for " + path, e); } }
public CopyParams(@NotNull String copyFrom, int rev) throws SVNException { this.copyFrom = copyFrom.isEmpty() ? null : SVNURL.parseURIEncoded(copyFrom); this.rev = rev; } }
public static SVNURL createAbsoluteURL( HttpServletRequest request, String path ) throws SVNException { if ( ! path.contains("://") ) { StringBuilder buffer = new StringBuilder(request.getScheme()); buffer.append("://").append(request.getServerName()); buffer.append(":").append( String.valueOf(request.getServerPort() )); buffer.append(path); path = buffer.toString(); } return SVNURL.parseURIEncoded(path); }
public SVNURL getCopyFromSVNURL() throws SVNException { String url = getCopyFromURL(); if (url != null) { return SVNURL.parseURIEncoded(url); } return null; }
public SVNURL getSVNURL() throws SVNException { String url = getURL(); if (url != null) { return SVNURL.parseURIEncoded(url); } return null; }
public SVNURL getSVNURL() throws SVNException { String url = getURL(); if (url != null) { return SVNURL.parseURIEncoded(url); } return null; }
public SVNURL getRepositoryRootURL() throws SVNException { String url = getRepositoryRoot(); if (url != null) { return SVNURL.parseURIEncoded(url); } return null; }
/** * Gets {@link #remote} as {@link SVNURL}. */ public SVNURL getSVNURL() throws SVNException { return SVNURL.parseURIEncoded(getURL()); }
public SVNURL getCopyFromSVNURL() throws SVNException { String url = getCopyFromURL(); if (url != null) { return SVNURL.parseURIEncoded(url); } return null; }
public SVNURL getCopyFromSVNURL() throws SVNException { String url = getCopyFromURL(); if (url != null) { return SVNURL.parseURIEncoded(url); } return null; }
public void relocate(String from, String to, String path, boolean recurse) throws ClientException { SVNUpdateClient client = getSVNUpdateClient(); try { client.doRelocate(new File(path).getAbsoluteFile(), SVNURL.parseURIEncoded(from), SVNURL.parseURIEncoded(to), recurse); } catch (SVNException e) { throwException(e); } finally { resetLog(); } }
public ISVNRemote openRemoteSession(String pathOrUrl) throws ClientException, SubversionException { try { return JavaHLRemoteSession.open(SVNURL.parseURIEncoded(pathOrUrl)); } catch (SVNException e) { throw ClientException.fromException(e); } }
public void reparent(String url) throws ClientException { try { svnRepository.setLocation(SVNURL.parseURIEncoded(url), false); } catch (SVNException e) { throw ClientException.fromException(e); } }
public void doImport(String path, String url, String message, boolean recurse) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, recurse); } catch (SVNException e) { throwException(e); } }
public SVNURL convertHttpToFile(String path) throws SVNException { String uri = DAVPathUtil.addLeadingSlash(path); if (!uri.startsWith(getResourceContext())) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "Invalid path ''{0}'' requested", path), SVNLogType.NETWORK); } return SVNURL.parseURIEncoded(getResourceRepositoryRoot() + uri.substring(getResourceContext().length())); }
public String getSessionRelativePath(String urlString) throws ClientException { try { final SVNURL url = SVNURL.parseURIEncoded(urlString); return SVNPathUtil.getPathAsChild(svnRepository.getLocation().getPath(), url.getPath()); } catch (SVNException e) { throw ClientException.fromException(e); } }
private SvnTarget getAbsoluteTarget(String path) { if (SVNPathUtil.isURL(path)) { try { return SvnTarget.fromURL(SVNURL.parseURIEncoded(path)); } catch (SVNException e) { return SvnTarget.fromFile(SVNFileUtil.createFilePath(path)); } } else { return SvnTarget.fromFile(SVNFileUtil.createFilePath(path)); } } }
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); }