public External(String path, SVNURL externalURL, long revision) { this.path = path; this.url = externalURL.toDecodedString(); this.revision = revision; }
public External(String path, SVNURL url, long revision) { this.path = path; this.url = url.toDecodedString(); this.revision = revision; }
SerializableSVNURL(SVNURL url) { this.url = url; this.decodedUrl = url.toDecodedString(); }
/** {@inheritDoc} */ public String getLocation() { return remoteRepository.toDecodedString() + "/" + resourceFileName; }
public synchronized void writeObject(ObjectOutputStream s) throws IOException { s.writeUTF(url.toDecodedString()); }
private byte[] getReposRelPath() throws UnsupportedEncodingException { if (reposRelPath == null) { if (repositoryRootUrl != null && locationUrl != null) { reposRelPath = SVNPathUtil.getRelativePath(repositoryRootUrl.toDecodedString(), locationUrl.toDecodedString()).getBytes("UTF-8"); } } return reposRelPath; }
public static String isChild(SVNURL parent, SVNURL child) { if (parent == null || child == null) return null; if (parent.equals(child)) return null; final String parentPath = parent.toDecodedString(); final String childPath = child.toDecodedString(); return isChild(parentPath, childPath); }
public static String getRelativeURL(SVNURL parent, SVNURL child, boolean encoded) { String parentURLAsString = encoded ? parent.toString() : parent.toDecodedString(); String childURLAsString = encoded ? child.toString() : child.toDecodedString(); String relativePath = SVNPathUtil.getPathAsChild(parentURLAsString, childURLAsString); return relativePath == null ? "" : relativePath; }
private byte[] getName() throws UnsupportedEncodingException { if (name == null) { if (locationUrl != null) { name = SVNEncodingUtil.uriDecode(SVNPathUtil.tail(locationUrl.toDecodedString())).getBytes("UTF-8"); } } return name; }
public Credential getCredential(SerializableSVNURL serializableURL, String realm) throws SVNException { Credential cred; String url = serializableURL.getSVNURL().toDecodedString(); // Try any shorter URL specification while looking for credentials while ( (cred = get(getCredentialsKey(url, realm))) == null && url != null ) { int index = url.lastIndexOf('/'); if(index >= 0 && index + 1 < url.length()) index ++; url = index >= 0 ? url.substring(0,index) : null; } return cred; }
private String mapToReposRelPath(String pathOrUrl) { if (SVNPathUtil.isURL(pathOrUrl)) { return SVNPathUtil.getPathAsChild(SVNEncodingUtil.uriDecode(pathOrUrl), repositoryRoot.toDecodedString()); } else { return SVNPathUtil.append(baseRelPath, pathOrUrl.startsWith("/") ? pathOrUrl.substring("/".length()) : pathOrUrl); } }
public Credential getCredential(SVNURL url, String realm) { return null == url ? get(realm) : get(url.toDecodedString()); }
private SVNConflictVersion[] makeConflictVersions(File victimAbsPath, SVNNodeKind nodeKind, SVNURL rootUrl, SvnNgMergeDriver.MergeSource mergeSource, File targetAbsPath) { File child = SVNFileUtil.skipAncestor(targetAbsPath, victimAbsPath); assert child != null; String leftPath = SVNPathUtil.getRelativePath(rootUrl.toDecodedString(), mergeSource.url1.toDecodedString()); String rightPath = SVNPathUtil.getRelativePath(rootUrl.toDecodedString(), mergeSource.url2.toDecodedString()); SVNConflictVersion[] svnConflictVersions = new SVNConflictVersion[2]; svnConflictVersions[0] = new SVNConflictVersion(rootUrl, SVNPathUtil.append(leftPath, SVNFileUtil.getFilePath(child)), mergeSource.rev1, nodeKind); svnConflictVersions[1] = new SVNConflictVersion(rootUrl, SVNPathUtil.append(rightPath, SVNFileUtil.getFilePath(child)), mergeSource.rev2, nodeKind); return svnConflictVersions; }
public SvnInfo(SVNInfo info) { this(info.getURL().toDecodedString(), info.getCommittedRevision().getNumber()); }
public SvnInfo(SVNInfo info) { this(info.getURL().toDecodedString(), info.getCommittedRevision().getNumber()); }
/** * @param modulePath The root of the current module that svn was checking out when it hits 'ext'. * Since we call svnkit multiple times in general case to check out from multiple locations, * we use this to make the path relative to the entire workspace, not just the particular module. */ public External(String modulePath, SVNExternal ext) { this.path = modulePath + '/' + ext.getPath(); this.url = ext.getResolvedURL().toDecodedString(); this.revision = ext.getRevision().getNumber(); }
/** * @param modulePath The root of the current module that svn was checking out when it hits 'ext'. * Since we call svnkit multiple times in general case to check out from multiple locations, * we use this to make the path relative to the entire workspace, not just the particular module. */ public External(String modulePath, SVNExternal ext) { this.path = modulePath + '/' + ext.getPath(); this.url = ext.getResolvedURL().toDecodedString(); this.revision = ext.getRevision().getNumber(); }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to open repository ''{0}''", getLocation().toDecodedString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open an ra_local session to URL")); } }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to open repository ''{0}''", getLocation().toDecodedString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open an ra_local session to URL"), SVNLogType.FSFS); } }
private void openRepository() throws SVNException { try { openRepositoryRoot(); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_LOCAL_REPOS_OPEN_FAILED, "Unable to open repository ''{0}''", getLocation().toDecodedString()); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err.wrap("Unable to open an ra_local session to URL"), SVNLogType.FSFS); } }