Exemple #1
0
  public List<String> getAuthors() {
    List<String> authors = new LinkedList<String>();

    for (LogEntry logEntry : logEntries) {
      if (!authors.contains(logEntry.getAuthor())) {
        authors.add(logEntry.getAuthor());
      }
    }

    Collections.sort(authors);

    return authors;
  }
Exemple #2
0
  public void removeEntriesWithPathForAuthor(String path, String author) {
    if (logEntries == null || logEntries.isEmpty()) {
      return;
    }

    int count = logEntries.size();
    int i = 0;

    while (i < count) {
      LogEntry logEntry = logEntries.get(i);
      if (!logEntry.getAuthor().equals(author)) {
        i++;
        continue;
      }

      logEntry.removeEntriesWithPath(path);
      if (logEntry.isEmpty()) {
        logEntries.remove(logEntry);
        count--;
        continue;
      }

      i++;
    }

    isOrdered = false;
  }
Exemple #3
0
  private List<LogEntry> getUnorderedAuthorLogEntries(String author) {
    List<LogEntry> entries = new LinkedList<LogEntry>();

    for (LogEntry logEntry : logEntries) {
      if (logEntry.getAuthor().equals(author)) {
        entries.add(logEntry);
      }
    }

    return entries;
  }
Exemple #4
0
  public LogReport getLogReportForAuthor(String author) {
    LogReport report = new LogReport();

    for (LogEntry entry : logEntries) {
      if (entry.getAuthor().equals(author)) {
        report.addLogEntry(entry);
      }
    }

    return report.isEmpty() ? null : report;
  }
 public SvnFileRevision(
     SvnVcs vcs, SVNRevision pegRevision, LogEntry logEntry, String url, String copyFromPath) {
   final SVNRevision revision = SVNRevision.create(logEntry.getRevision());
   myRevisionNumber = new SvnRevisionNumber(revision);
   myPegRevision = pegRevision;
   myRevision = revision;
   myAuthor = logEntry.getAuthor();
   myDate = logEntry.getDate();
   myCommitMessage = logEntry.getMessage();
   myCopyFromPath = copyFromPath;
   myVCS = vcs;
   myURL = url;
   myMergeSources = new ArrayList<>();
 }
Exemple #6
0
 protected SvnFileRevision createRevision(
     final LogEntry logEntry, final String copyPath, LogEntryPath entryPath)
     throws SVNException {
   Date date = logEntry.getDate();
   String author = logEntry.getAuthor();
   String message = logEntry.getMessage();
   SVNRevision rev = SVNRevision.create(logEntry.getRevision());
   final SVNURL url = myRepositoryRoot.appendPath(myLastPath, true);
   //      final SVNURL url = entryPath != null ?
   // myRepositoryRoot.appendPath(entryPath.getPath(), true) :
   //                         myRepositoryRoot.appendPath(myLastPathCorrector.getBefore(),
   // false);
   return new SvnFileRevision(
       myVcs, myPegRevision, rev, url.toString(), author, date, message, copyPath, myCharset);
 }
Exemple #7
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;
  }