public void setSourceRevisions(SVNRevision pegRevision, SVNRevision revision) { if (pegRevision == SVNRevision.UNDEFINED) { if (SVNPathUtil.isURL(mySource)) { pegRevision = SVNRevision.HEAD; } else { pegRevision = SVNRevision.WORKING; } } if (revision == SVNRevision.UNDEFINED) { revision = pegRevision; } mySourceRevision = revision; mySourcePegRevision = pegRevision; } }
public void setSourceRevisions(SVNRevision pegRevision, SVNRevision revision) { if (pegRevision == SVNRevision.UNDEFINED) { if (SVNPathUtil.isURL(mySource)) { pegRevision = SVNRevision.HEAD; } else { pegRevision = SVNRevision.WORKING; } } if (revision == SVNRevision.UNDEFINED) { revision = pegRevision; } mySourceRevision = revision; mySourcePegRevision = pegRevision; } }
public boolean isURL() { return SVNPathUtil.isURL(myTarget); }
public static boolean isURL(String pathOrUrl){ return SVNPathUtil.isURL(pathOrUrl); }
protected static boolean isURL(String pathOrUrl) { return SVNPathUtil.isURL(pathOrUrl); }
protected static boolean isURL(String pathOrUrl) { return SVNPathUtil.isURL(pathOrUrl); }
protected static boolean isURL(String pathOrUrl) { return SVNPathUtil.isURL(pathOrUrl); }
public boolean isURL() { return SVNPathUtil.isURL(myTarget); }
public boolean isURL() { return SVNPathUtil.isURL(myTarget); }
public static boolean isURL(String pathOrUrl){ return SVNPathUtil.isURL(pathOrUrl); }
private void fillLocalAndRemoteTargets(Set<String> path, Set<String> localPaths, Set<String> remoteUrls) { for (String targetPath : path) { if (SVNPathUtil.isURL(targetPath)) { remoteUrls.add(targetPath); } else { localPaths.add(targetPath); } } }
public static String getAbsolutePath(String path){ if (path == null){ return null; } if (path.length() == 0 || "/".equals(path)){ return "/"; } if (isURL(path)){ return path; } path = path.endsWith("/") ? path.substring(0, path.length() - "/".length()) : path; return path.startsWith("/") ? path : "/" + path; }
public static String getAbsolutePath(String path){ if (path == null){ return null; } if (path.length() == 0 || "/".equals(path)){ return "/"; } if (isURL(path)){ return path; } path = path.endsWith("/") ? path.substring(0, path.length() - "/".length()) : path; return path.startsWith("/") ? path : "/" + path; }
public static String getAbsolutePath(String path){ if (path == null){ return null; } if (path.length() == 0 || "/".equals(path)){ return "/"; } if (isURL(path)){ return path; } path = path.endsWith("/") ? path.substring(0, path.length() - "/".length()) : path; return path.startsWith("/") ? path : "/" + path; }
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); } }
private SvnTarget getTarget(String path, Revision revision) { SVNRevision svnRevision = getSVNRevision(revision); if (SVNPathUtil.isURL(path)) { try { return SvnTarget.fromURL(SVNURL.parseURIEncoded(path), svnRevision); } catch (SVNException e) { //never happens if SVNPathUtil#isURL works correctly throw new IllegalArgumentException(e); } } return SvnTarget.fromFile(new File(path), svnRevision); }
private SVNNodeKind verifyPath(FSRoot root, String path) throws SVNException { SVNNodeKind kind = root.checkNodeKind(path); if (kind == SVNNodeKind.NONE) { if (SVNPathUtil.isURL(path)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' is a URL, probably should be a path", path); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "Path ''{0}'' does not exist", path); SVNErrorManager.error(err, SVNLogType.FSFS); } return kind; }
private SVNNodeKind verifyPath(FSRoot root, String path) throws SVNException { SVNNodeKind kind = root.checkNodeKind(path); if (kind == SVNNodeKind.NONE) { if (SVNPathUtil.isURL(path)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' is a URL, probably should be a path", path); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "Path ''{0}'' does not exist", path); SVNErrorManager.error(err, SVNLogType.FSFS); } return kind; }
private SVNNodeKind verifyPath(FSRoot root, String path) throws SVNException { SVNNodeKind kind = root.checkNodeKind(path); if (kind == SVNNodeKind.NONE) { if (SVNPathUtil.isURL(path)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' is a URL, probably should be a path", path); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "Path ''{0}'' does not exist", path); SVNErrorManager.error(err, SVNLogType.FSFS); } return kind; }
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)); } } }