org.eclipse.jgit.revwalk
Class DepthWalk.RevWalk

java.lang.Object
  extended by org.eclipse.jgit.revwalk.RevWalk
      extended by org.eclipse.jgit.revwalk.DepthWalk.RevWalk
All Implemented Interfaces:
Iterable<RevCommit>, DepthWalk
Enclosing interface:
DepthWalk

public static class DepthWalk.RevWalk
extends RevWalk
implements DepthWalk

Subclass of RevWalk that performs depth filtering.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jgit.revwalk.DepthWalk
DepthWalk.Commit, DepthWalk.ObjectWalk, DepthWalk.RevWalk
 
Constructor Summary
DepthWalk.RevWalk(ObjectReader or, int depth)
           
DepthWalk.RevWalk(Repository repo, int depth)
           
 
Method Summary
protected  RevCommit createCommit(AnyObjectId id)
          Construct a new unparsed commit for the given object.
 int getDepth()
           
 RevFlag getReinterestingFlag()
           
 RevFlag getUnshallowFlag()
           
 void markRoot(RevCommit c)
          Mark a root commit (i.e., one whose depth should be considered 0.)
 
Methods inherited from class org.eclipse.jgit.revwalk.RevWalk
assertNotStarted, carry, carry, dispose, disposeFlag, getObjectReader, getRevFilter, getRevSort, getTreeFilter, hasRevSort, isMergedInto, isRetainBody, iterator, lookupAny, lookupBlob, lookupCommit, lookupOrNull, lookupTag, lookupTree, markStart, markStart, markUninteresting, newFlag, next, parseAny, parseAny, parseBody, parseCommit, parseHeaders, parseTag, parseTree, peel, release, reset, reset, resetRetain, resetRetain, setRetainBody, setRevFilter, setTreeFilter, sort, sort, toObjectWalkWithSameObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthWalk.RevWalk

public DepthWalk.RevWalk(Repository repo,
                         int depth)
Parameters:
repo - Repository to walk
depth - Maximum depth to return

DepthWalk.RevWalk

public DepthWalk.RevWalk(ObjectReader or,
                         int depth)
Parameters:
or - ObjectReader to use
depth - Maximum depth to return
Method Detail

markRoot

public void markRoot(RevCommit c)
              throws MissingObjectException,
                     IncorrectObjectTypeException,
                     IOException
Mark a root commit (i.e., one whose depth should be considered 0.)

Parameters:
c - Commit to mark
Throws:
IOException
IncorrectObjectTypeException
MissingObjectException

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.

getDepth

public int getDepth()
Specified by:
getDepth in interface DepthWalk
Returns:
Depth to filter to.

getUnshallowFlag

public RevFlag getUnshallowFlag()
Specified by:
getUnshallowFlag in interface DepthWalk
Returns:
flag marking commits that should become unshallow.

getReinterestingFlag

public RevFlag getReinterestingFlag()
Specified by:
getReinterestingFlag in interface DepthWalk
Returns:
flag marking commits that are interesting again.


Copyright © 2012. All Rights Reserved.