# HG changeset patch # User David M. Carr <david@carrclan.us> # Date 1351216056 14400 # Thu Oct 25 21:47:36 2012 -0400 # Node ID d4ccec82b8164908f73c4ea23a4b0b00803b750b # Parent ab8061d9942be855f7b1da22ac325432b2ca7c17 push: suppress ref output by default When communicating with the user on push, Mercurial doesn't show much on success. Currently, Hg-Git shows every changed ref. After this change, the default output will more closely match Mercurial's regular behavior (no per-ref output), while changed refs will be shown if --verbose is specified, and all refs will be shown if --debug is specified. diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -277,7 +277,10 @@ if remote_name and new_refs: for ref, new_sha in new_refs.iteritems(): if new_sha != old_refs.get(ref): - self.ui.status(" %s::%s => GIT:%s\n" % + self.ui.note(" %s::%s => GIT:%s\n" % + (remote_name, ref, new_sha[0:8])) + else: + self.ui.debug(" %s::%s => GIT:%s\n" % (remote_name, ref, new_sha[0:8])) self.update_remote_branches(remote_name, new_refs) diff --git a/tests/test-git-tags.t b/tests/test-git-tags.t --- a/tests/test-git-tags.t +++ b/tests/test-git-tags.t @@ -73,6 +73,5 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:3b7fd1b3 $ cd .. diff --git a/tests/test-hg-author.t b/tests/test-hg-author.t --- a/tests/test-hg-author.t +++ b/tests/test-hg-author.t @@ -56,7 +56,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:cffa0e8d $ echo gamma >> beta $ hgcommit -u "test <test@example.com> (comment)" -m 'modify beta' @@ -64,7 +63,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:2b9ec6a4 $ echo gamma > gamma $ hg add gamma @@ -73,7 +71,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:fee30180 $ echo delta > delta $ hg add delta @@ -82,7 +79,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:d1659250 $ echo epsilon > epsilon $ hg add epsilon @@ -91,7 +87,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:ee985f12 $ echo zeta > zeta $ hg add zeta @@ -100,7 +95,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:d21e26b4 $ echo eta > eta $ hg add eta @@ -109,7 +103,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:8c878c97 $ echo theta > theta $ hg add theta @@ -118,7 +111,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:1e03e913 $ hg log --graph | egrep -v ': *(not-master|master)' @ changeset: 8:d3c51ce68cfd diff --git a/tests/test-hg-branch.t b/tests/test-hg-branch.t --- a/tests/test-hg-branch.t +++ b/tests/test-hg-branch.t @@ -59,7 +59,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:05c2bcbe $ hg branch gamma | grep -v 'permanent and global' marked working directory as branch gamma @@ -68,7 +67,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/master => GIT:296802ef $ hg log --graph | $filterhash | egrep -v ': *(not-master|master)' @ changeset: 2:05aed681ccb3 diff --git a/tests/test-hg-tags.t b/tests/test-hg-tags.t --- a/tests/test-hg-tags.t +++ b/tests/test-hg-tags.t @@ -54,8 +54,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/tags/alpha => GIT:7eeab2ea - default::refs/heads/master => GIT:9a2616b9 $ hg log --graph | egrep -v ': *(not-master|master)' @ changeset: 1:d529e9229f6d diff --git a/tests/test-push.t b/tests/test-push.t --- a/tests/test-push.t +++ b/tests/test-push.t @@ -61,7 +61,6 @@ pushing to $TESTTMP/gitrepo exporting hg objects to git searching for changes - default::refs/heads/beta => GIT:cffa0e8d $ cd .. @@ -140,7 +139,6 @@ $ hg push -fr master pushing to $TESTTMP/gitrepo searching for changes - default::refs/heads/master => GIT:cc119202 $ echo % this should fail, no changes to push % this should fail, no changes to push diff --git a/tests/test-subrepos.t b/tests/test-subrepos.t --- a/tests/test-subrepos.t +++ b/tests/test-subrepos.t @@ -117,7 +117,6 @@ pushing to $TESTTMP/gitrepo1 exporting hg objects to git searching for changes - default::refs/heads/master => GIT:4663c492 $ cd .. $ cd gitrepo1 $ echo % there shall be two gitlink entries, with values matching that in .hgsubstate