public static boolean isCanonical(String path) { return (path != null && path.equals(canonicalizePath(path))); }
public static boolean isCanonical(String path) { return (path != null && path.equals(canonicalizePath(path))); }
private static String ensureAbsolutePath(String path) { if (path != null) { path = SVNPathUtil.canonicalizePath(path); } if (path != null && (path.length() == 0 || path.charAt(0) != '/')) { return "/" + path; } return path; }
public static boolean isCanonical(String path) { return (path != null && path.equals(canonicalizePath(path))); }
private static String ensureAbsolutePath(String path) { if (path != null) { path = SVNPathUtil.canonicalizePath(path); } if (path != null && (path.length() == 0 || path.charAt(0) != '/')) { return "/" + path; } return path; }
private static String ensureAbsolutePath(String path) { if (path != null) { path = SVNPathUtil.canonicalizePath(path); } if (path != null && (path.length() == 0 || path.charAt(0) != '/')) { return "/" + path; } return path; }
public DefaultLoadHandler(boolean usePreCommitHook, boolean usePostCommitHook, SVNUUIDAction uuidAction, String parentDir, ISVNAdminEventHandler progressHandler) { myProgressHandler = progressHandler; myIsUsePreCommitHook = usePreCommitHook; myIsUsePostCommitHook = usePostCommitHook; myUUIDAction = uuidAction; myParentDir = SVNPathUtil.canonicalizePath(parentDir); myRevisionsMap = new SVNHashMap(); }
public DefaultLoadHandler(boolean usePreCommitHook, boolean usePostCommitHook, SVNUUIDAction uuidAction, String parentDir, ISVNAdminEventHandler progressHandler) { myProgressHandler = progressHandler; myIsUsePreCommitHook = usePreCommitHook; myIsUsePostCommitHook = usePostCommitHook; myUUIDAction = uuidAction; myParentDir = SVNPathUtil.canonicalizePath(parentDir); myRevisionsMap = new SVNHashMap(); }
public static void testCanonical(String path) throws DAVException { if (path != null && !path.equals(SVNPathUtil.canonicalizePath(path))) { throw new DAVException("Path ''{0}'' is not canonicalized;\nthere is a problem with the client.", new Object[] { path }, HttpServletResponse.SC_BAD_REQUEST, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, 0, null); } }
public DefaultLoadHandler(boolean usePreCommitHook, boolean usePostCommitHook, SVNUUIDAction uuidAction, String parentDir, ISVNAdminEventHandler progressHandler) { myProgressHandler = progressHandler; myIsUsePreCommitHook = usePreCommitHook; myIsUsePostCommitHook = usePostCommitHook; myUUIDAction = uuidAction; myParentDir = SVNPathUtil.canonicalizePath(parentDir); myRevisionsMap = new SVNHashMap(); }
private static File grabFileName(String s) { return SVNFileUtil.createFilePath(SVNPathUtil.canonicalizePath(s)); }
public static File getParentFile(File file) { String path = file.getAbsolutePath(); path = path.replace(File.separatorChar, '/'); path = SVNPathUtil.canonicalizePath(path); int up = 0; while (path.endsWith("/..")) { path = SVNPathUtil.removeTail(path); up++; } for (int i = 0; i < up; i++) { path = SVNPathUtil.removeTail(path); } path = path.replace('/', File.separatorChar); file = new File(path); return file.getParentFile(); }
public static File getParentFile(File file) { String path = file.getAbsolutePath(); path = path.replace(File.separatorChar, '/'); path = SVNPathUtil.canonicalizePath(path); int up = 0; while (path.endsWith("/..")) { path = SVNPathUtil.removeTail(path); up++; } for(int i = 0; i < up; i++) { path = SVNPathUtil.removeTail(path); } path = path.replace('/', File.separatorChar); file = new File(path); return file.getParentFile(); }
public SVNPath(String target, boolean keepPegRevision, boolean parsePegRevision) throws SVNException { myTarget = target; if (parsePegRevision) { parsePegRevision(keepPegRevision); } myTarget = SVNPathUtil.canonicalizePath(myTarget); assertControlChars(isURL() ? SVNEncodingUtil.uriDecode(myTarget) : myTarget); }
public SVNPath(String target, boolean keepPegRevision, boolean parsePegRevision) throws SVNException { myTarget = target; if (parsePegRevision) { parsePegRevision(keepPegRevision); } myTarget = SVNPathUtil.canonicalizePath(myTarget); assertControlChars(isURL() ? SVNEncodingUtil.uriDecode(myTarget) : myTarget); }
public SVNPath(String target, boolean keepPegRevision) throws SVNException { myTarget = target; parsePegRevision(keepPegRevision); myTarget = SVNPathUtil.canonicalizePath(myTarget); assertControlChars(isURL() ? SVNEncodingUtil.uriDecode(myTarget) : myTarget); }
public SVNPath(String target, boolean keepPegRevision) throws SVNException { myTarget = target; parsePegRevision(keepPegRevision); myTarget = SVNPathUtil.canonicalizePath(myTarget); assertControlChars(isURL() ? SVNEncodingUtil.uriDecode(myTarget) : myTarget); }
public static SVNLock getLock(Collection items) throws SVNException { if (items == null || items.isEmpty()) { return null; } List values = parseTuple("sss(?s)s(?s)", items, null); if (values.isEmpty()) { return null; } String path = SVNPathUtil.canonicalizePath(getString(values, 0)); String token = getString(values, 1); String owner = getString(values, 2); String comment = getString(values, 3); Date creationDate = getDate(values, 4); Date expirationDate = null; if (values.size() >= 6 && values.get(5) != null) { expirationDate = getDate(values, 5); } return new SVNLock(path, token, owner, comment, creationDate, expirationDate); }
public static SVNLock getLock(Collection items) throws SVNException { List values = parseTuple("sss(?s)s(?s)", items, null); String path = SVNPathUtil.canonicalizePath(getString(values, 0)); String token = getString(values, 1); String owner = getString(values, 2); String comment = getString(values, 3); Date creationDate = getDate(values, 4); Date expirationDate = null; if (values.size() >= 6 && values.get(5) != null) { expirationDate = getDate(values, 5); } return new SVNLock(path, token, owner, comment, creationDate, expirationDate); }
public SVNPath(String target, boolean hasPegRevision) throws SVNException { myTarget = target; myHasPegRevision = hasPegRevision; if (myHasPegRevision) { parsePegRevision(true); } else { parsePegRevision(false); } myTarget = SVNPathUtil.canonicalizePath(myTarget); assertControlChars(isURL() ? SVNEncodingUtil.uriDecode(myTarget) : myTarget); }