Introduce a topological walker
commita26bed248dc8239b24c15e880340f1366b2e7e11
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Tue, 14 Aug 2007 22:26:49 +0000 (15 00:26 +0200)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 22 Aug 2007 18:38:41 +0000 (22 20:38 +0200)
tree080d929ea9eda4fef1319233591c0786a792db02
parent5c2f79e7b795ec275ec0bf8bedda742cec8edef2
Introduce a topological walker

This alters quite a lot making the walker more exact and working.
Consider it a redesign although the changes are small.

The unit test is performed on the TopologicalWalker since the
Walker itself is not used. It is easies to test the topological
walker since there are expectations on its exact result, whereas
the generic Walker does not have as tough outcomes.

Default is now to search all branches not just the first one. One
reason is that you will not be able to follow the development of
just the integration branch due to fast-forwards.

The collection mechanism only store ObjectId's and author times
for the sorter to save memory. Unlike the previous version all
traversed commis (i.e. their id) are saved since the sorter
needs the complete graph. The interesting commits are marked
separately and filtered when the sorter reports the final ordering.
Some pre-filtering could be done, but that would be much
more complicated and maybe even counterproductive.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java
org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java
org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java
org.spearce.jgit/src/org/spearce/jgit/lib/TopologicalWalker.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/lib/Walker.java
org.spearce.jgit/tst/org/spearce/jgit/lib/T0007_WalkerTest.java