Example #1
0
  public int getLastModificationRevisionForPath(String path) {
    int revision = -1;

    for (LogEntry logEntry : logEntries) {
      List<PathEntry> pathEntries = logEntry.getPathEntries();
      for (PathEntry pathEntry : pathEntries) {
        if (pathEntry.getPath().equals(path) && revision < pathEntry.getRevision()) {
          revision = pathEntry.getRevision();
          break;
        }
      }
    }

    return revision;
  }
Example #2
0
  public boolean hasSamePathEntryWithHigherRevisionForAuthor(PathEntry pathEntry, String author) {
    for (LogEntry logEntry : logEntries) {
      if (!logEntry.getAuthor().equals(author)
          || logEntry.getRevision() < pathEntry.getRevision()) {
        continue;
      }

      List<PathEntry> pathEntries = logEntry.getPathEntries();
      for (PathEntry _pathEntry : pathEntries) {
        if (_pathEntry.getPath().equals(pathEntry.getPath())
            && _pathEntry.getAction().equals(pathEntry.getAction())) {
          return true;
        }
      }
    }

    return false;
  }