public class CommitListBuilder
extends java.lang.Object
List of
Commits from it. The result list is sorted by date.
The implementation allows for a tolerance of several minutes
between individual file commits, but author and message must be identical.| Constructor | Description |
|---|---|
CommitListBuilder(java.util.Iterator revisions) |
|
CommitListBuilder(java.util.SortedSet revisions) |
Creates a new instance using the given set of
Revisions. |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addNewCommit(Revision rev) |
|
protected void |
addRevToCommit(Commit commit,
Revision rev) |
|
java.util.List |
createCommitList() |
Creates a
List of Commits from the source iterator. |
static boolean |
isInTimeFrame(Commit commit,
java.util.Date date) |
Returns
true if the date lies within the timespan of
the commit, plus/minus a tolerance. |
static boolean |
isSameCommit(Commit commit,
Revision rev) |
Returns
true if change is part of the commit, that is if
they have the same author, the same message, and are within the same
timeframe. |
protected void |
processRevision(Revision rev) |
public CommitListBuilder(java.util.SortedSet revisions)
Revisions.
The set must be sorted by date, oldest first.revisions - a set of Revisionspublic CommitListBuilder(java.util.Iterator revisions)
public java.util.List createCommitList()
List of Commits from the source iterator.
The result list will be sorted by date.Commit objectsprotected void processRevision(Revision rev)
protected void addNewCommit(Revision rev)
public static boolean isSameCommit(Commit commit, Revision rev)
true if change is part of the commit, that is if
they have the same author, the same message, and are within the same
timeframe.commit - the commitrev - the revision to check against this committrue if change is part of this commitpublic static boolean isInTimeFrame(Commit commit, java.util.Date date)
true if the date lies within the timespan of
the commit, plus/minus a tolerance.date - the date to check against this committrue if the date lies within the timespan of the commit