class documentation

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__ Iterate over walk entries.
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: BaseObjectStore, include: ObjectID | Sequence[ObjectID], exclude: Sequence[ObjectID] | None = None, order: str = 'date', reverse: bool = False, max_entries: int | None = None, paths: Sequence[bytes] | None = None, rename_detector: RenameDetector | None = None, follow: bool = False, since: int | None = None, until: int | None = None, get_parents: Callable[[Commit], list[ObjectID]] = lambda commit: commit.parents, queue_cls: type = _CommitTimeQueue):

Constructor.

Parameters
store:BaseObjectStoreObjectStore instance for looking up objects.
include:ObjectID | Sequence[ObjectID]Iterable of SHAs of commits to include along with their ancestors.
exclude:Sequence[ObjectID] | NoneIterable of SHAs of commits to exclude along with their ancestors, overriding includes.
order:strORDER_* constant specifying the order of results. Anything other than ORDER_DATE may result in O(n) memory usage.
reverse:boolIf True, reverse the order of output, requiring O(n) memory.
max_entries:int | NoneThe maximum number of entries to yield, or None for no limit.
paths:Sequence[bytes] | NoneIterable of file or subtree paths to show entries for.
rename_detector:RenameDetector | Nonediff.RenameDetector object for detecting renames.
follow:boolIf True, follow path across renames/copies. Forces a default rename_detector.
since:int | NoneTimestamp to list commits after.
until:int | NoneTimestamp to list commits before.
get_parents:Callable[[Commit], list[ObjectID]]Method to retrieve the parents of a commit
queue_cls:typeA class to use for a queue of commits, supporting the iterator protocol. The constructor takes a single argument, the Walker.
def __iter__(self) -> Iterator[WalkEntry]:

Iterate over walk entries.

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: TreeChange) -> bool:

Undocumented

def _next(self) -> WalkEntry | None:

Undocumented

def _path_matches(self, changed_path: bytes | None) -> bool:

Undocumented

def _reorder(self, results: Iterator[WalkEntry]) -> Iterator[WalkEntry] | list[WalkEntry]:

Possibly reorder a results iterator.

Returns: An iterator or list of WalkEntry objects, in the order
required by the Walker.
Parameters
results:Iterator[WalkEntry]An iterator of WalkEntry objects, in the order returned from the queue_cls.
Returns
Iterator[WalkEntry] | list[WalkEntry]Undocumented
def _should_return(self, entry: WalkEntry) -> bool | None:

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
entry:WalkEntryThe WalkEntry to consider.
Returns
bool | NoneUndocumented
_num_entries: int =

Undocumented

_out_queue: deque[WalkEntry] =

Undocumented

_queue =

Undocumented