Repo.revision_history is nice and simple, but doesn't expose a whole lot of options. This series builds up a framework for walking commits efficiently and correctly with respect to C git's implementation.
I did have some benchmarks of this vs. the previous implementation, but there were some improvements between then and now, so I need to find and re-run them. This one has fewer incompatible API changes and more NEWS entries :) c0ce323 tests/utils: Function for quickly building commit graphs. ffb71f2 tests/utils: Build commit graphs with custom trees. e6c6233 tests/utils: Build graphs of commits with arbitrary attributes. b7e0347 diff_tree: Make rename/rewrite threshold constants public. acdedc3 objects: Make ShaFile.__eq__ work when other is not a ShaFile. b2d01e8 Add a simple, extensible framework for commit walking. f08b421 walk: Add option to limit the number of commits returned. c27aa61 walk: Encapsulate walk results in an object. b3230a8 objects: Add lookup_path method to Tree. 6862389 diff_tree: Add function for getting tree changes for merges. 54cd823 walk: Add WalkEntry method to get tree changes. c724a65 walk: Return only commits matching specified paths. af48e9f diff_tree: Construct RenameDetectors without passing tree SHAs. d932a45 diff_tree: Add want_unchanged to changes_with_renames. f3e58be diff_tree: Add rename_detector to tree_changes. 287dd49 diff_tree: Add rename_detector to tree_changes_for_merge. 5a73d58 walk: Add option for rename detection. 609cff5 walk: Add option to follow paths across rename/copy. f177ce6 walk: Raise MissingCommitError instead of KeyError. cc6b61f repo: Implement revision_history with a Walker. e0a0c53 walk: Add options to limit by commit time. a8b3be4 walk: Handle a small, fixed number of out-of-date-order commits. 3afc0a1 walk: Simplify WalkEntry constructor. b7a54b1 walk: Extract commit-time pqueue into its own class. ef41aaa walk: Separate reordering logic from iteration logic. f7b9736 test_walk: Simplify commit_time attr assignment. d8b2b02 walk: Allow topological ordering. eb06ea5 Add walk module to tests/__init__.py. a80b4f2 walk: Walk a fixed number of extra commits before returning. b56bc6b walk: Exclude parents more aggressively. 4548e33 walk: Reorganize 'since' boundary code. af3611b walk: Record last commit yielded by the pq. b356947 _compat: Add implementation of all(). b203909 walk: Propagate excluded out-of-order commits. NEWS | 19 ++ dulwich/_compat.py | 14 ++ dulwich/diff_tree.py | 136 +++++++++++-- dulwich/errors.py | 1 + dulwich/object_store.py | 18 +-- dulwich/objects.py | 30 +++- dulwich/repo.py | 52 +---- dulwich/tests/__init__.py | 1 + dulwich/tests/test_diff_tree.py | 201 ++++++++++++++++++- dulwich/tests/test_utils.py | 84 ++++++++ dulwich/tests/test_walk.py | 411 +++++++++++++++++++++++++++++++++++++++ dulwich/tests/utils.py | 80 ++++++++ dulwich/walk.py | 364 ++++++++++++++++++++++++++++++++++ 13 files changed, 1330 insertions(+), 81 deletions(-) _______________________________________________ Mailing list: https://launchpad.net/~dulwich-users Post to : dulwich-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~dulwich-users More help : https://help.launchpad.net/ListHelp