class documentation

class Walker(object):

View In Hierarchy

Object for performing a walk of commits in a store.

Walker objects are initialized with a store and other options and can then be treated as iterators of Commit objects.

Method __init__ Constructor.
Method __iter__ Undocumented
Instance Variable excluded Undocumented
Instance Variable follow Undocumented
Instance Variable get_parents Undocumented
Instance Variable include Undocumented
Instance Variable max_entries Undocumented
Instance Variable order Undocumented
Instance Variable paths Undocumented
Instance Variable rename_detector Undocumented
Instance Variable reverse Undocumented
Instance Variable since Undocumented
Instance Variable store Undocumented
Instance Variable until Undocumented
Method _change_matches Undocumented
Method _next Undocumented
Method _path_matches Undocumented
Method _reorder Possibly reorder a results iterator.
Method _should_return Determine if a walk entry should be returned..
Instance Variable _num_entries Undocumented
Instance Variable _out_queue Undocumented
Instance Variable _queue Undocumented
def __init__(self, store, include, exclude=None, order=ORDER_DATE, reverse=False, max_entries=None, paths=None, rename_detector=None, follow=False, since=None, until=None, get_parents=(lambda commit: commit.parents), queue_cls=_CommitTimeQueue):

Constructor.

Parameters
storeObjectStore instance for looking up objects.
includeIterable of SHAs of commits to include along with their ancestors.
excludeIterable of SHAs of commits to exclude along with their ancestors, overriding includes.
orderORDER_* constant specifying the order of results. Anything other than ORDER_DATE may result in O(n) memory usage.
reverseIf True, reverse the order of output, requiring O(n) memory.
max_entriesThe maximum number of entries to yield, or None for no limit.
pathsIterable of file or subtree paths to show entries for.
rename_detectordiff.RenameDetector object for detecting renames.
followIf True, follow path across renames/copies. Forces a default rename_detector.
sinceTimestamp to list commits after.
untilTimestamp to list commits before.
get_parentsMethod to retrieve the parents of a commit
queue_clsA class to use for a queue of commits, supporting the iterator protocol. The constructor takes a single argument, the Walker.
def __iter__(self):

Undocumented

excluded =

Undocumented

follow =

Undocumented

get_parents =

Undocumented

include =

Undocumented

max_entries =

Undocumented

order =

Undocumented

paths =

Undocumented

rename_detector =

Undocumented

reverse =

Undocumented

since =

Undocumented

store =

Undocumented

until =

Undocumented

def _change_matches(self, change):

Undocumented

def _next(self):

Undocumented

def _path_matches(self, changed_path):

Undocumented

def _reorder(self, results):

Possibly reorder a results iterator.

Returns: An iterator or list of WalkEntry objects, in the order
required by the Walker.
Parameters
resultsAn iterator of WalkEntry objects, in the order returned from the queue_cls.
def _should_return(self, entry):

Determine if a walk entry should be returned..

Returns: True if the WalkEntry should be returned by this walk, or
False otherwise (e.g. if it doesn't match any requested paths).
Parameters
entryThe WalkEntry to consider.
_num_entries: int =

Undocumented

_out_queue =

Undocumented

_queue =

Undocumented