protected String getRelativePath(String origPath) { if (myRepositoryRoot == null) { assert !hasHttpV2Support(); throw new UnsupportedOperationException(); } String rootPath = myRepositoryRoot.getURIEncodedPath(); return SVNPathUtil.getPathAsChild(rootPath, origPath); }
/** * {@inheritDoc} */ protected String getRepositoryURL( File path ) throws ScmException { try { return SVNURL.fromFile( path ).getURIEncodedPath(); } catch ( SVNException e ) { throw new IllegalArgumentException( e.getMessage() ); } }
protected String getRelativePath() { return getRelativePath(myRepository.getLocation().getURIEncodedPath()); }
public void fetchRepositoryRoot(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryRoot()) { String rootPath = repository.getLocation().getURIEncodedPath(); DAVBaselineInfo info = DAVUtil.getBaselineInfo(this, repository, rootPath, -1, false, false, null); // remove relative part from the path rootPath = rootPath.substring(0, rootPath.length() - info.baselinePath.length()); SVNURL location = repository.getLocation(); SVNURL url = location.setPath(rootPath, true); repository.setRepositoryRoot(url); } }
public void fetchRepositoryRoot(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryRoot()) { String rootPath = repository.getLocation().getURIEncodedPath(); DAVBaselineInfo info = DAVUtil.getBaselineInfo(this, repository, rootPath, -1, false, false, null); // remove relative part from the path rootPath = rootPath.substring(0, rootPath.length() - info.baselinePath.length()); SVNURL location = repository.getLocation(); SVNURL url = location.setPath(rootPath, true); repository.setRepositoryRoot(url); } }
public void fetchRepositoryRoot(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryRoot()) { String rootPath = repository.getLocation().getURIEncodedPath(); DAVBaselineInfo info = DAVUtil.getBaselineInfo(this, repository, rootPath, -1, false, false, null); // remove relative part from the path rootPath = rootPath.substring(0, rootPath.length() - info.baselinePath.length()); SVNURL location = repository.getLocation(); SVNURL url = location.setPath(rootPath, true); repository.setRepositoryRoot(url); } }
public void handleProperty( SVNURL url, SVNPropertyData property ) throws SVNException { debug( url.getURIEncodedPath(), property.getName(), property.getValue() ); }
public void handleProperty( SVNURL url, SVNPropertyData property ) throws SVNException { debug( url.getURIEncodedPath(), property.getName(), property.getValue() ); }
public String getURI(SVNURL url) throws SVNException { String uri = DAVPathUtil.addLeadingSlash(url.getURIEncodedPath()); if (uri.startsWith(getResourceContext())) { uri = uri.substring(getResourceContext().length()); uri = DAVPathUtil.addLeadingSlash(uri); } else { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "Invalid URL ''{0}'' requested", url.toString()), SVNLogType.NETWORK); } return uri; }
private String getReportTarget(DAVConnection connection) throws SVNException { if (isHttpV2Enabled()) { return connection.getMeResource(); } else { String bcPath = getLocation().getURIEncodedPath(); return DAVUtil.getVCCPath(connection, this, bcPath); } }
public void fetchRepositoryRoot(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryRoot()) { if (hasHttpV2Support()) { repository.setRepositoryRoot(myRepositoryRoot); } else { String rootPath = repository.getLocation().getURIEncodedPath(); DAVBaselineInfo info = DAVUtil.getBaselineInfo(this, repository, rootPath, -1, false, false, null); // remove relative part from the path rootPath = rootPath.substring(0, rootPath.length() - info.baselinePath.length()); SVNURL location = repository.getLocation(); SVNURL url = location.setPath(rootPath, true); repository.setRepositoryRoot(url); } } }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
public SVNURL convertHttpToFile(SVNURL url) throws SVNException { String uri = DAVPathUtil.addLeadingSlash(url.getURIEncodedPath()); if (!uri.startsWith(getResourceContext())) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "Invalid URL ''{0}'' requested", url.toString()), SVNLogType.NETWORK); } return SVNURL.parseURIEncoded(getResourceRepositoryRoot() + getRepositoryRelativePath(url)); }
public void fetchRepositoryUUID(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryUUID()) { DAVUtil.findStartingProperties(this, repository, repository.getLocation().getURIEncodedPath()); if (!repository.hasRepositoryUUID()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NO_REPOS_UUID, "Please upgrade to server 0.19 or later"); SVNErrorManager.error(err, SVNLogType.NETWORK); } } }
public void fetchRepositoryUUID(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryUUID()) { DAVUtil.findStartingProperties(this, repository, repository.getLocation().getURIEncodedPath()); if (!repository.hasRepositoryUUID()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NO_REPOS_UUID, "Please upgrade to server 0.19 or later"); SVNErrorManager.error(err); } } }
public void fetchRepositoryUUID(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryUUID()) { DAVUtil.findStartingProperties(this, repository, repository.getLocation().getURIEncodedPath()); if (!repository.hasRepositoryUUID()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NO_REPOS_UUID, "Please upgrade to server 0.19 or later"); SVNErrorManager.error(err, SVNLogType.NETWORK); } } }
public void fetchRepositoryUUID(DAVRepository repository) throws SVNException { if (!repository.hasRepositoryUUID()) { DAVUtil.findStartingProperties(this, repository, repository.getLocation().getURIEncodedPath()); if (!repository.hasRepositoryUUID()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NO_REPOS_UUID, "Please upgrade to server 0.19 or later"); SVNErrorManager.error(err, SVNLogType.NETWORK); } } }