push: add more output about what was added (issue #64)
l33t pointed out that currently, Hg-Git doesn't provide any confirmation that a push was successful other than the exit code. Normal Mercurial provides a couple other messages followed by "added X changesets with Y changes to Z files". After this change, Hg-Git will provide much more similar output. It's not identical, as the underlying model is substantially different, but the concept is the same. The main message is "added X commits with Y trees and Z blobs". This change doesn't affect the output of what references/branches were touched. That will be addressed in a subsequent commit. Dulwich doesn't provide an easy hook to get the information needed for this output. Instead of passing generate_pack_contents as the pack generator function to send_pack, I pass a custom function that determines the "missing" objects, stores the counts, and then calls generate_pack_contents (which then will determine the "missing" objects again. The new expected output: searching for changes # unless quiet true <N> commits found # if verbose true list of commits: # if debugflag true and at least one commit found <each hash> # if debugflag true and at least one commit found adding objects # if at least one commit found unless quiet true added <N> commits with <N> trees and <N> blobs # if at least one object unless # quiet true https://bitbucket.org/durin42/hg-git/issue/64/push-confirmation
Showing
- hggit/git_handler.py 27 additions, 3 deletionshggit/git_handler.py
- tests/test-conflict-1.t 2 additions, 0 deletionstests/test-conflict-1.t
- tests/test-conflict-2.t 2 additions, 0 deletionstests/test-conflict-2.t
- tests/test-convergedmerge.t 2 additions, 0 deletionstests/test-convergedmerge.t
- tests/test-empty-working-tree.t 2 additions, 0 deletionstests/test-empty-working-tree.t
- tests/test-encoding.t 2 additions, 0 deletionstests/test-encoding.t
- tests/test-file-removal.t 2 additions, 0 deletionstests/test-file-removal.t
- tests/test-git-tags.t 2 additions, 0 deletionstests/test-git-tags.t
- tests/test-hg-author.t 16 additions, 0 deletionstests/test-hg-author.t
- tests/test-hg-branch.t 4 additions, 0 deletionstests/test-hg-branch.t
- tests/test-hg-tags.t 2 additions, 0 deletionstests/test-hg-tags.t
- tests/test-merge.t 2 additions, 0 deletionstests/test-merge.t
- tests/test-octopus.t 2 additions, 0 deletionstests/test-octopus.t
- tests/test-push.t 4 additions, 0 deletionstests/test-push.t
- tests/test-subrepos.t 2 additions, 0 deletionstests/test-subrepos.t
- tests/test-tree-decomposition.t 2 additions, 0 deletionstests/test-tree-decomposition.t
Loading
Please register or sign in to comment