public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = beginTransactionForCommit(youngestRev); } else { if (myAuthor != null && !"".equals(myAuthor)) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.AUTHOR, myAuthor); } if (myLogMessage != null && !"".equals(myLogMessage)) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.LOG, myLogMessage); } } myTxnRoot = myFSFS.createTransactionRoot(myTxn.getTxnId()); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, myAuthor); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public void openDir(String path, long revision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_DIRECTORY, "Path ''{0}'' not present", path); SVNErrorManager.error(err, SVNLogType.FSFS); } DirBaton dirBaton = new DirBaton(revision, fullPath, parentBaton.isCopied()); myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(SVNRepository.INVALID_REVISION, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(SVNRepository.INVALID_REVISION, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(SVNRepository.INVALID_REVISION, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.concatToAbs(myBasePath, path); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, myTxnRoot.getTxnID())); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(FSRepository.SVN_INVALID_REVNUM, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.concatToAbs(myBasePath, path); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, myTxnRoot.getTxnID())); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = FSTransactionRoot.beginTransactionForCommit(youngestRev, myRevProps, myFSFS); } else { myFSFS.changeTransactionProperties(myTxn.getTxnId(), myRevProps); } myTxnRoot = myFSFS.createTransactionRoot(myTxn); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, getAuthor()); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = FSTransactionRoot.beginTransactionForCommit(youngestRev, myRevProps, myFSFS); } else { myFSFS.changeTransactionProperties(myTxn.getTxnId(), myRevProps); } myTxnRoot = myFSFS.createTransactionRoot(myTxn); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, getAuthor()); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { DirBaton dirBaton = (DirBaton) myDirsStack.peek(); if (FSRepository.isValidRevision(dirBaton.getBaseRevision())) { FSRevisionNode existingNode = myTxnRoot.getRevisionNode(dirBaton.getPath()); long createdRev = existingNode.getCreatedRevision(); if (dirBaton.getBaseRevision() < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(dirBaton.getPath(), SVNNodeKind.DIR), SVNLogType.FSFS); } } myCommitter.changeNodeProperty(dirBaton.getPath(), name, value); }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { DirBaton dirBaton = (DirBaton) myDirsStack.peek(); if (FSRepository.isValidRevision(dirBaton.getBaseRevision())) { FSRevisionNode existingNode = myTxnRoot.getRevisionNode(dirBaton.getPath()); long createdRev = existingNode.getCreatedRevision(); if (dirBaton.getBaseRevision() < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(dirBaton.getPath(), SVNNodeKind.DIR), SVNLogType.FSFS); } } myCommitter.changeNodeProperty(dirBaton.getPath(), name, value); }
public void openDir(String path, long revision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.concatToAbs(myBasePath, path); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_DIRECTORY, "Path ''{0}'' not present", path); SVNErrorManager.error(err); } DirBaton dirBaton = new DirBaton(revision, fullPath, parentBaton.isCopied()); myDirsStack.push(dirBaton); }
public void changeDirProperty(String name, String value) throws SVNException { DirBaton dirBaton = (DirBaton) myDirsStack.peek(); if (FSRepository.isValidRevision(dirBaton.getBaseRevision())) { FSRevisionNode existingNode = myTxnRoot.getRevisionNode(dirBaton.getPath()); long createdRev = existingNode.getId().getRevision(); if (dirBaton.getBaseRevision() < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(dirBaton.getPath(), myTxnRoot.getTxnID())); } } changeNodeProperty(dirBaton.getPath(), name, value); }
public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = FSTransactionRoot.beginTransactionForCommit(youngestRev, myRevProps, myFSFS); } else { myFSFS.changeTransactionProperties(myTxn.getTxnId(), myRevProps); } myTxnRoot = myFSFS.createTransactionRoot(myTxn); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, getAuthor()); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public void openDir(String path, long revision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_DIRECTORY, "Path ''{0}'' not present", path); SVNErrorManager.error(err, SVNLogType.FSFS); } DirBaton dirBaton = new DirBaton(revision, fullPath, parentBaton.isCopied()); myDirsStack.push(dirBaton); }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { DirBaton dirBaton = (DirBaton) myDirsStack.peek(); if (FSRepository.isValidRevision(dirBaton.getBaseRevision())) { FSRevisionNode existingNode = myTxnRoot.getRevisionNode(dirBaton.getPath()); long createdRev = existingNode.getCreatedRevision(); if (dirBaton.getBaseRevision() < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(dirBaton.getPath(), SVNNodeKind.DIR), SVNLogType.FSFS); } } myCommitter.changeNodeProperty(dirBaton.getPath(), name, value); }
public void openDir(String path, long revision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_DIRECTORY, "Path ''{0}'' not present", path); SVNErrorManager.error(err, SVNLogType.FSFS); } DirBaton dirBaton = new DirBaton(revision, fullPath, parentBaton.isCopied()); myDirsStack.push(dirBaton); }