org.eclipse.jgit.revwalk
Class DepthWalk.ObjectWalk

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

public static class DepthWalk.ObjectWalk
extends ObjectWalk
implements DepthWalk

Subclass of ObjectWalk 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.ObjectWalk(ObjectReader or, int depth)
           
DepthWalk.ObjectWalk(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(RevObject o)
          Mark a root commit (i.e., one whose depth should be considered 0.)
 void markUnshallow(RevObject c)
          Mark an element which used to be shallow in the client, but which should now be considered a full commit.
 
Methods inherited from class org.eclipse.jgit.revwalk.ObjectWalk
checkConnectivity, dispose, getPathBuffer, getPathHashCode, getPathLength, getPathString, markStart, markUninteresting, next, nextObject, reset, sort, sort
 
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, resetRetain, resetRetain, setRetainBody, setRevFilter, setTreeFilter, toObjectWalkWithSameObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthWalk.ObjectWalk

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

DepthWalk.ObjectWalk

public DepthWalk.ObjectWalk(ObjectReader or,
                            int depth)
Parameters:
or - Object Reader
depth - Maximum depth to return
Method Detail

markRoot

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

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

markUnshallow

public void markUnshallow(RevObject c)
                   throws MissingObjectException,
                          IncorrectObjectTypeException,
                          IOException
Mark an element which used to be shallow in the client, but which should now be considered a full commit. Any ancestors of this commit should be included in the walk, even if they are the ancestor of an uninteresting commit.

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

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.