public static boolean areFileContentsChanged(FSRoot root1, String path1, FSRoot root2, String path2) throws SVNException { if (root1.checkNodeKind(path1) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path1); SVNErrorManager.error(err, SVNLogType.FSFS); } if (root2.checkNodeKind(path2) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path2); SVNErrorManager.error(err, SVNLogType.FSFS); } FSRevisionNode revNode1 = root1.getRevisionNode(path1); FSRevisionNode revNode2 = root2.getRevisionNode(path2); return !areRepresentationsEqual(revNode1, revNode2, false); }
public boolean areFileContentsChanged(FSRoot root1, String path1, FSRoot root2, String path2) throws SVNException { if (root1.checkNodeKind(path1) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path1); SVNErrorManager.error(err); } if (root2.checkNodeKind(path2) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path2); SVNErrorManager.error(err); } FSRevisionNode revNode1 = root1.getRevisionNode(path1); FSRevisionNode revNode2 = root2.getRevisionNode(path2); return !areRepresentationsEqual(revNode1, revNode2, false); }
public static boolean areFileContentsChanged(FSRoot root1, String path1, FSRoot root2, String path2) throws SVNException { if (root1.checkNodeKind(path1) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path1); SVNErrorManager.error(err, SVNLogType.FSFS); } if (root2.checkNodeKind(path2) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path2); SVNErrorManager.error(err, SVNLogType.FSFS); } FSRevisionNode revNode1 = root1.getRevisionNode(path1); FSRevisionNode revNode2 = root2.getRevisionNode(path2); return !areRepresentationsEqual(revNode1, revNode2, false); }
public static boolean areFileContentsChanged(FSRoot root1, String path1, FSRoot root2, String path2) throws SVNException { if (root1.checkNodeKind(path1) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path1); SVNErrorManager.error(err, SVNLogType.FSFS); } if (root2.checkNodeKind(path2) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "''{0}'' is not a file", path2); SVNErrorManager.error(err, SVNLogType.FSFS); } FSRevisionNode revNode1 = root1.getRevisionNode(path1); FSRevisionNode revNode2 = root2.getRevisionNode(path2); return !areRepresentationsEqual(revNode1, revNode2, false); }
public void closeDir() throws SVNException { if (myIsVerify) { FSRevisionNode node = myRoot.getRevisionNode(myCurrentDirInfo.myFullPath); Map entries = node.getDirEntries(myFSFS); for (Iterator entriesIter = entries.keySet().iterator(); entriesIter.hasNext();) { String entryName = (String) entriesIter.next(); String entryPath = SVNPathUtil.append(myCurrentDirInfo.myFullPath, entryName); SVNNodeKind kind = myRoot.checkNodeKind(entryPath); FSRevisionNode entryNode = myRoot.getRevisionNode(entryPath); if (kind == SVNNodeKind.DIR) { entryNode.getDirEntries(myFSFS); } else if (kind == SVNNodeKind.FILE) { entryNode.getFileLength(); } else { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "Unexpected node kind {0} for ''{1}''", new Object[] { kind, entryPath }); SVNErrorManager.error(err, SVNLogType.FSFS); } } } for (Iterator entries = myCurrentDirInfo.myDeletedEntries.keySet().iterator(); entries.hasNext();) { String path = (String) entries.next(); dumpNode(path, SVNNodeKind.UNKNOWN, SVNAdminHelper.NODE_ACTION_DELETE, false, null, -1); } myCurrentDirInfo = myCurrentDirInfo.myParentInfo; }
public void closeDir() throws SVNException { if (myIsVerify) { FSRevisionNode node = myRoot.getRevisionNode(myCurrentDirInfo.myFullPath); Map entries = node.getDirEntries(myFSFS); for (Iterator entriesIter = entries.keySet().iterator(); entriesIter.hasNext();) { String entryName = (String) entriesIter.next(); String entryPath = SVNPathUtil.append(myCurrentDirInfo.myFullPath, entryName); SVNNodeKind kind = myRoot.checkNodeKind(entryPath); FSRevisionNode entryNode = myRoot.getRevisionNode(entryPath); if (kind == SVNNodeKind.DIR) { entryNode.getDirEntries(myFSFS); } else if (kind == SVNNodeKind.FILE) { entryNode.getFileLength(); } else { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "Unexpected node kind {0} for ''{1}''", new Object[] { kind, entryPath }); SVNErrorManager.error(err, SVNLogType.FSFS); } } } for (Iterator entries = myCurrentDirInfo.myDeletedEntries.keySet().iterator(); entries.hasNext();) { String path = (String) entries.next(); dumpNode(path, SVNNodeKind.UNKNOWN, SVNAdminHelper.NODE_ACTION_DELETE, false, null, -1); } myCurrentDirInfo = myCurrentDirInfo.myParentInfo; }
public void closeDir() throws SVNException { if (myIsVerify) { FSRevisionNode node = myRoot.getRevisionNode(myCurrentDirInfo.myFullPath); Map entries = node.getDirEntries(myFSFS); for (Iterator entriesIter = entries.keySet().iterator(); entriesIter.hasNext();) { String entryName = (String) entriesIter.next(); String entryPath = SVNPathUtil.append(myCurrentDirInfo.myFullPath, entryName); SVNNodeKind kind = myRoot.checkNodeKind(entryPath); FSRevisionNode entryNode = myRoot.getRevisionNode(entryPath); if (kind == SVNNodeKind.DIR) { entryNode.getDirEntries(myFSFS); } else if (kind == SVNNodeKind.FILE) { entryNode.getFileLength(); } else { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "Unexpected node kind {0} for ''{1}''", new Object[] { kind, entryPath }); SVNErrorManager.error(err, SVNLogType.FSFS); } } } for (Iterator entries = myCurrentDirInfo.myDeletedEntries.keySet().iterator(); entries.hasNext();) { String path = (String) entries.next(); dumpNode(path, SVNNodeKind.UNKNOWN, SVNAdminHelper.NODE_ACTION_DELETE, false, null, -1); } myCurrentDirInfo = myCurrentDirInfo.myParentInfo; }
public static SVNNodeKind checkPath(FSRoot root, String path) throws DAVException { try { return root.checkNodeKind(path); } catch (SVNException svne) { if (svne.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_DIRECTORY) { return SVNNodeKind.NONE; } throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error checking kind of path ''{0}'' in repository", new Object[] { path }); } }
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; }
SVNNodeKind kind = baseRoot.checkNodeKind(baseLocation.getPath()); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' not found in filesystem", path);
SVNNodeKind kind = baseRoot.checkNodeKind(baseLocation.getPath()); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' not found in filesystem", path);
SVNNodeKind kind = baseRoot.checkNodeKind(baseLocation.getPath()); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' not found in filesystem", path);
private FSEntry fakeDirEntry(String reposPath, FSRoot root) throws SVNException { if (root.checkNodeKind(reposPath) == SVNNodeKind.NONE) { return null; } FSRevisionNode node = root.getRevisionNode(reposPath); FSEntry dirEntry = new FSEntry(node.getId(), node.getType(), SVNPathUtil.tail(node.getCreatedPath())); return dirEntry; }
FSRevisionNode node = root.getRevisionNode(path); FSID id = includeIDs ? node.getId() : null; SVNNodeKind kind = root.checkNodeKind(path); getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler); } finally {
FSRevisionNode node = root.getRevisionNode(path); FSID id = includeIDs ? node.getId() : null; SVNNodeKind kind = root.checkNodeKind(path); getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler); } finally {
FSRevisionNode node = root.getRevisionNode(path); FSID id = includeIDs ? node.getId() : null; SVNNodeKind kind = root.checkNodeKind(path); getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler); } finally {
FSRevisionNode node = root.getRevisionNode(path); FSID id = includeIDs ? node.getId() : null; SVNNodeKind kind = root.checkNodeKind(path); getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler); } finally {
FSRevisionNode node = root.getRevisionNode(path); FSID id = includeIDs ? node.getId() : null; SVNNodeKind kind = root.checkNodeKind(path); getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler); } finally {