Ejemplo n.º 1
0
  private void verifyLocks() throws SVNException {
    FSTransactionRoot txnRoot = getTxnRoot();
    Map changes = txnRoot.getChangedPaths();
    Object[] changedPaths = changes.keySet().toArray();
    Arrays.sort(changedPaths);

    String lastRecursedPath = null;
    for (int i = 0; i < changedPaths.length; i++) {
      String changedPath = (String) changedPaths[i];
      boolean recurse = true;

      if (lastRecursedPath != null
          && SVNPathUtil.getPathAsChild(lastRecursedPath, changedPath) != null) {
        continue;
      }

      FSPathChange change = (FSPathChange) changes.get(changedPath);

      if (change.getChangeKind() == FSPathChangeKind.FS_PATH_CHANGE_MODIFY) {
        recurse = false;
      }
      allowLockedOperation(myFSFS, changedPath, myAuthor, myLockTokens, recurse, true);

      if (recurse) {
        lastRecursedPath = changedPath;
      }
    }
  }
Ejemplo n.º 2
0
 public boolean handleCommitPath(String path, ISVNEditor editor) throws SVNException {
   ElideMergeInfoEditor elideEditor = (ElideMergeInfoEditor) editor;
   String inheritedMergeInfoPath = elideEditor.getInheritedMergeInfoPath();
   if (inheritedMergeInfoPath == null || "/".equals(path)) {
     return false;
   }
   String pathSuffix = SVNPathUtil.getPathAsChild(inheritedMergeInfoPath, path);
   if (pathSuffix == null) {
     SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "path suffix is null");
     SVNErrorManager.error(err, SVNLogType.DEFAULT);
   }
   boolean elides =
       shouldElideMergeInfo(
           (Map) myMergeInfoCatalog.get(inheritedMergeInfoPath),
           (Map) myMergeInfoCatalog.get(path),
           pathSuffix);
   if (elides) {
     myElidablePaths.add(path);
   }
   return false;
 }