net.sf.statcvs.input
Class CommitListBuilder
public class CommitListBuilder
Takes a set of revisions, and builds a
List
of
Commit
s 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.
$Id: CommitListBuilder.java,v 1.5 2008/04/02 11:22:15 benoitx Exp $
CommitListBuilder
public CommitListBuilder(Iterator revisions)
CommitListBuilder
public CommitListBuilder(SortedSet revisions)
Creates a new instance using the given set of
Revision
s.
The set must be sorted by date, oldest first.
addNewCommit
protected void addNewCommit(Revision rev)
addRevToCommit
protected void addRevToCommit(Commit commit,
Revision rev)
createCommitList
public List createCommitList()
Creates a
List
of
Commit
s from the source iterator.
The result list will be sorted by date.
isInTimeFrame
public static boolean isInTimeFrame(Commit commit,
Date date)
Returns true
if the date lies within the timespan of
the commit, plus/minus a tolerance.
date
- the date to check against this commit
true
if the date lies within the timespan of the commit
isSameCommit
public 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.
commit
- the commitrev
- the revision to check against this commit
true
if change is part of this commit
processRevision
protected void processRevision(Revision rev)