Mercurial > hg > hg-git
changeset 488:4793c3725abe
push: only output updated refs
author | David M. Carr <david@carrclan.us> |
---|---|
date | Wed, 05 Sep 2012 23:27:31 -0400 |
parents | 68e5dddc7a20 |
children | ccd521a1f585 |
files | hggit/git_handler.py tests/test-git-tags.out tests/test-hg-author.out tests/test-hg-branch.out tests/test-hg-tags.out tests/test-push.out |
diffstat | 6 files changed, 3 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -245,9 +245,10 @@ remote_name = self.remote_name(remote) if remote_name and new_refs: - for ref, sha in new_refs.iteritems(): + for ref, new_sha in new_refs.iteritems(): + if new_sha != old_refs.get(ref): self.ui.status(" %s::%s => GIT:%s\n" % - (remote_name, ref, sha[0:8])) + (remote_name, ref, new_sha[0:8])) self.update_remote_branches(remote_name, new_refs) if old_refs == new_refs:
--- a/tests/test-git-tags.out +++ b/tests/test-git-tags.out @@ -19,6 +19,4 @@ pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/tags/beta => GIT:e6f255c6 - default::refs/tags/alpha => GIT:7eeab2ea default::refs/heads/master => GIT:3b7fd1b3
--- a/tests/test-hg-author.out +++ b/tests/test-hg-author.out @@ -7,42 +7,34 @@ pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:cffa0e8d pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:2b9ec6a4 pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:fee30180 pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:d1659250 pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:ee985f12 pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:d21e26b4 pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:8c878c97 pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:1e03e913 @ changeset: 8:d3c51ce68cfd | tag: default/master
--- a/tests/test-hg-branch.out +++ b/tests/test-hg-branch.out @@ -7,13 +7,11 @@ pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:05c2bcbe marked working directory as branch gamma pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:296802ef @ changeset: 2:05aed681ccb3 | branch: gamma
--- a/tests/test-hg-tags.out +++ b/tests/test-hg-tags.out @@ -7,7 +7,6 @@ pushing to git://localhost/gitrepo exporting hg objects to git creating and sending data - default::refs/heads/not-master => GIT:7eeab2ea default::refs/tags/alpha => GIT:7eeab2ea default::refs/heads/master => GIT:9a2616b9 @ changeset: 1:d529e9229f6d
--- a/tests/test-push.out +++ b/tests/test-push.out @@ -7,8 +7,6 @@ exporting hg objects to git creating and sending data default::refs/heads/beta => GIT:cffa0e8d - default::refs/heads/not-master => GIT:7eeab2ea - default::refs/heads/master => GIT:7eeab2ea [0] % should have two different branches beta cffa0e8 add beta @@ -52,14 +50,9 @@ % ... but succeed with -f pushing to git://localhost/gitrepo creating and sending data - default::refs/heads/beta => GIT:cffa0e8d - default::refs/heads/not-master => GIT:7eeab2ea default::refs/heads/master => GIT:cc119202 [0] % this should fail, no changes to push pushing to git://localhost/gitrepo creating and sending data - default::refs/heads/beta => GIT:cffa0e8d - default::refs/heads/not-master => GIT:7eeab2ea - default::refs/heads/master => GIT:cc119202 [1]