Implement a commit time based RevFilter for before/after filtering
commit0db8ce97500cee152d98a6b28377564d778d0ebc
authorShawn O. Pearce <spearce@spearce.org>
Sun, 9 Mar 2008 23:31:50 +0000 (9 19:31 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 7 Apr 2008 03:40:47 +0000 (6 23:40 -0400)
tree18121a12492e197e4267a36617aa049ce50445e7
parentd3d48592d2f74b464baa281c2bbe8708471bd82f
Implement a commit time based RevFilter for before/after filtering

This new filter operates on the commit time field of each commit.  It
is easy to access during a revision walk as we have parsed it out to
implement prioritization within our DateRevQueue.  Therefore this is
almost free to execute.

The StopWalkException is used to abort the revision walker if we get a
commit whose time is out of range and we are an after date sort of
filter.  This trick works as a means to break out of the main loop and
prevent looking at any other commits, but is based entirely on our
decision to sort commits by timestamp inside of the DateRevQueue.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/revwalk/RevCommit.java
org.spearce.jgit/src/org/spearce/jgit/revwalk/filter/CommitTimeRevFilter.java [new file with mode: 0644]