Package org.eclipse.jgit.revplot
Class PlotWalk
java.lang.Object
org.eclipse.jgit.revwalk.RevWalk
org.eclipse.jgit.revplot.PlotWalk
- All Implemented Interfaces:
AutoCloseable
,Iterable<RevCommit>
Specialized RevWalk for visualization of a commit graph.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<AnyObjectId,
Set<Ref>> private Repository
private Map<AnyObjectId,
Set<Ref>> -
Constructor Summary
ConstructorsConstructorDescriptionPlotWalk
(Repository repo) Create a new revision walker for a given repository. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalRefs
(Iterable<Ref> refs) Add additional refs to the walkprotected RevCommit
Construct a new unparsed commit for the given object.void
dispose()
Dispose all internal state and invalidate all RevObject instances.private Ref[]
getRefs
(AnyObjectId commitId) next()
Pop the next most recent commit.void
Add or remove a sorting strategy for the returned commits.Methods inherited from class org.eclipse.jgit.revwalk.RevWalk
assertNoCommitsMarkedStart, assertNotStarted, assumeShallow, carry, carry, close, createReachabilityChecker, disposeFlag, getMergedInto, getMergedInto, getObjectReader, getRevFilter, getRevSort, getTreeFilter, hasRevSort, isFirstParent, isMergedInto, isMergedIntoAll, isMergedIntoAny, isRetainBody, iterator, lookupAny, lookupBlob, lookupCommit, lookupOrNull, lookupTag, lookupTree, markStart, markStart, markUninteresting, newFlag, parseAny, parseAny, parseBody, parseCommit, parseHeaders, parseTag, parseTree, peel, reset, reset, resetRetain, resetRetain, retainOnReset, retainOnReset, setFirstParent, setRetainBody, setRevFilter, setRewriteParents, setTreeFilter, sort, toObjectWalkWithSameObjects
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
additionalRefMap
-
reverseRefMap
-
repository
-
-
Constructor Details
-
PlotWalk
Create a new revision walker for a given repository.- Parameters:
repo
- the repository the walker will obtain data from.
-
-
Method Details
-
dispose
public void dispose()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.
-
addAdditionalRefs
Add additional refs to the walk- Parameters:
refs
- additional refs- Throws:
IOException
-
sort
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 overRevSort.COMMIT_TIME_DESC
, otherwise it cannot enforce its ordering. -
createCommit
Construct a new unparsed commit for the given object.- Overrides:
createCommit
in classRevWalk
- Parameters:
id
- the object this walker requires a commit reference for.- Returns:
- a new unparsed reference for the object.
-
next
Pop the next most recent commit.- Overrides:
next
in classRevWalk
- Returns:
- next most recent commit; null if traversal is over.
- Throws:
MissingObjectException
- one 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 more of the next commit's parents are not actually commit objects.IOException
- a pack file or loose object could not be read.
-
getRefs
- Throws:
IOException
-