コード例 #1
0
    public void consume(Pair<SVNLogEntry, Integer> svnLogEntryIntegerPair) throws SVNException {
      final SVNLogEntry logEntry = svnLogEntryIntegerPair.getFirst();
      final Integer mergeLevel = svnLogEntryIntegerPair.getSecond();

      if (mergeLevel < 0) {
        if (myCurrentHierarchy != null) {
          myConsumer.consume(myCurrentHierarchy);
        }
        if (logEntry.hasChildren()) {
          myCurrentHierarchy = new TreeStructureNode<SVNLogEntry>(logEntry);
        } else {
          // just pass
          myCurrentHierarchy = null;
          myConsumer.consume(new TreeStructureNode<SVNLogEntry>(logEntry));
        }
      } else {
        addToLevel(myCurrentHierarchy, logEntry, mergeLevel);
      }
    }
コード例 #2
0
    public void accept(final SVNLogEntry entry) {
      final Map changedPaths = entry.getChangedPaths();
      if (changedPaths == null) return;

      for (Object o : changedPaths.values()) {
        final SVNLogEntryPath entryPath = (SVNLogEntryPath) o;
        if (entryPath != null && 'A' == entryPath.getType() && entryPath.getCopyPath() != null) {
          if (myCurrentPath.equals(entryPath.getPath())) {
            myHadChanged = true;
            myCurrentPath = entryPath.getCopyPath();
            return;
          } else if (SVNPathUtil.isAncestor(entryPath.getPath(), myCurrentPath)) {
            final String relativePath =
                SVNPathUtil.getRelativePath(entryPath.getPath(), myCurrentPath);
            myCurrentPath = SVNPathUtil.append(entryPath.getCopyPath(), relativePath);
            myHadChanged = true;
            return;
          }
        }
      }
    }