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.
This commit is contained in:
David M. Carr 2012-10-25 21:47:36 -04:00
parent 67b13fd7be
commit fb74ae0f84
7 changed files with 4 additions and 17 deletions

View File

@ -277,7 +277,10 @@ class GitHandler(object):
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)

View File

@ -73,6 +73,5 @@ bail if the user does not have dulwich
pushing to $TESTTMP/gitrepo
exporting hg objects to git
searching for changes
default::refs/heads/master => GIT:3b7fd1b3
$ cd ..

View File

@ -56,7 +56,6 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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 @@ bail if the user does not have dulwich
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

View File

@ -59,7 +59,6 @@ TODO stop using this when we're 1.5 only
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 @@ TODO stop using this when we're 1.5 only
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

View File

@ -54,8 +54,6 @@ bail if the user does not have dulwich
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

View File

@ -61,7 +61,6 @@ bail if the user does not have dulwich
pushing to $TESTTMP/gitrepo
exporting hg objects to git
searching for changes
default::refs/heads/beta => GIT:cffa0e8d
$ cd ..
@ -140,7 +139,6 @@ which should not implicitly also push the not-master ref.
$ 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

View File

@ -117,7 +117,6 @@ allow commits despite working copy presense
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