org.eclipse.jgit.revplot
Class PlotWalk

java.lang.Object
  extended by org.eclipse.jgit.revwalk.RevWalk
      extended by org.eclipse.jgit.revplot.PlotWalk
All Implemented Interfaces:
Iterable<RevCommit>

public class PlotWalk
extends RevWalk

Specialized RevWalk for visualization of a commit graph.


Constructor Summary
PlotWalk(Repository repo)
          Create a new revision walker for a given repository.
 
Method Summary
 void addAdditionalRefs(Iterable<Ref> refs)
          Add additional refs to the walk
protected  RevCommit createCommit(AnyObjectId id)
          Construct a new unparsed commit for the given object.
 void dispose()
          Dispose all internal state and invalidate all RevObject instances.
 RevCommit next()
          Pop the next most recent commit.
 void sort(RevSort s, boolean use)
          Add or remove a sorting strategy for the returned commits.
 
Methods inherited from class org.eclipse.jgit.revwalk.RevWalk
assertNotStarted, carry, carry, disposeFlag, getObjectReader, getRevFilter, getRevSort, getTreeFilter, hasRevSort, isMergedInto, isRetainBody, iterator, lookupAny, lookupBlob, lookupCommit, lookupOrNull, lookupTag, lookupTree, markStart, markStart, markUninteresting, newFlag, parseAny, parseAny, parseBody, parseCommit, parseHeaders, parseTag, parseTree, peel, release, reset, reset, resetRetain, resetRetain, setRetainBody, setRevFilter, setTreeFilter, sort, toObjectWalkWithSameObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotWalk

public PlotWalk(Repository repo)
Create a new revision walker for a given repository.

Parameters:
repo - the repository the walker will obtain data from.
Method Detail

dispose

public void dispose()
Description copied from class: RevWalk
Dispose all internal state and invalidate all RevObject instances.

All RevObject (and thus RevCommit, etc.) instances previously acquired from this RevWalk are invalidated by a dispose call. Applications must not retain or use RevObject instances obtained prior to the dispose call. All RevFlag instances are also invalidated, and must not be reused.

Overrides:
dispose in class RevWalk

addAdditionalRefs

public void addAdditionalRefs(Iterable<Ref> refs)
                       throws IOException
Add additional refs to the walk

Parameters:
refs - additional refs
Throws:
IOException

sort

public void sort(RevSort s,
                 boolean use)
Description copied from class: RevWalk
Add or remove a sorting strategy for the returned commits.

Multiple strategies can be applied at once, in which case some strategies may take precedence over others. As an example, RevSort.TOPO must take precedence over RevSort.COMMIT_TIME_DESC, otherwise it cannot enforce its ordering.

Overrides:
sort in class RevWalk
Parameters:
s - a sorting strategy to enable or disable.
use - true if this strategy should be used, false if it should be removed.

createCommit

protected RevCommit createCommit(AnyObjectId id)
Description copied from class: RevWalk
Construct a new unparsed commit for the given object.

Overrides:
createCommit in class RevWalk
Parameters:
id - the object this walker requires a commit reference for.
Returns:
a new unparsed reference for the object.

next

public RevCommit next()
               throws MissingObjectException,
                      IncorrectObjectTypeException,
                      IOException
Description copied from class: RevWalk
Pop the next most recent commit.

Overrides:
next in class RevWalk
Returns:
next most recent commit; null if traversal is over.
Throws:
MissingObjectException - one or or more of the next commit's parents are not available from the object database, but were thought to be candidates for traversal. This usually indicates a broken link.
IncorrectObjectTypeException - one or or more of the next commit's parents are not actually commit objects.
IOException - a pack file or loose object could not be read.


Copyright © 2012. All Rights Reserved.