class documentation
class Walker(object):
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 |
Undocumented |
Instance Variable | include |
Undocumented |
Instance Variable | max |
Undocumented |
Instance Variable | order |
Undocumented |
Instance Variable | paths |
Undocumented |
Instance Variable | rename |
Undocumented |
Instance Variable | reverse |
Undocumented |
Instance Variable | since |
Undocumented |
Instance Variable | store |
Undocumented |
Instance Variable | until |
Undocumented |
Method | _change |
Undocumented |
Method | _next |
Undocumented |
Method | _path |
Undocumented |
Method | _reorder |
Possibly reorder a results iterator. |
Method | _should |
Determine if a walk entry should be returned.. |
Instance Variable | _num |
Undocumented |
Instance Variable | _out |
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 | |
store | ObjectStore instance for looking up objects. |
include | Iterable of SHAs of commits to include along with their ancestors. |
exclude | Iterable of SHAs of commits to exclude along with their ancestors, overriding includes. |
order | ORDER_* constant specifying the order of results. Anything other than ORDER_DATE may result in O(n) memory usage. |
reverse | If True, reverse the order of output, requiring O(n) memory. |
max | The maximum number of entries to yield, or None for no limit. |
paths | Iterable of file or subtree paths to show entries for. |
rename | diff.RenameDetector object for detecting renames. |
follow | If True, follow path across renames/copies. Forces a default rename_detector. |
since | Timestamp to list commits after. |
until | Timestamp to list commits before. |
get | Method to retrieve the parents of a commit |
queue | A class to use for a queue of commits, supporting the iterator protocol. The constructor takes a single argument, the Walker. |
Possibly reorder a results iterator.
- Returns: An iterator or list of WalkEntry objects, in the order
- required by the Walker.
Parameters | |
results | An iterator of WalkEntry objects, in the order returned from the queue_cls. |