mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
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:
parent
67b13fd7be
commit
fb74ae0f84
@ -277,7 +277,10 @@ class GitHandler(object):
|
|||||||
if remote_name and new_refs:
|
if remote_name and new_refs:
|
||||||
for ref, new_sha in new_refs.iteritems():
|
for ref, new_sha in new_refs.iteritems():
|
||||||
if new_sha != old_refs.get(ref):
|
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]))
|
(remote_name, ref, new_sha[0:8]))
|
||||||
|
|
||||||
self.update_remote_branches(remote_name, new_refs)
|
self.update_remote_branches(remote_name, new_refs)
|
||||||
|
@ -73,6 +73,5 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:3b7fd1b3
|
|
||||||
|
|
||||||
$ cd ..
|
$ cd ..
|
||||||
|
@ -56,7 +56,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:cffa0e8d
|
|
||||||
|
|
||||||
$ echo gamma >> beta
|
$ echo gamma >> beta
|
||||||
$ hgcommit -u "test <test@example.com> (comment)" -m 'modify 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
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:2b9ec6a4
|
|
||||||
|
|
||||||
$ echo gamma > gamma
|
$ echo gamma > gamma
|
||||||
$ hg add gamma
|
$ hg add gamma
|
||||||
@ -73,7 +71,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:fee30180
|
|
||||||
|
|
||||||
$ echo delta > delta
|
$ echo delta > delta
|
||||||
$ hg add delta
|
$ hg add delta
|
||||||
@ -82,7 +79,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:d1659250
|
|
||||||
|
|
||||||
$ echo epsilon > epsilon
|
$ echo epsilon > epsilon
|
||||||
$ hg add epsilon
|
$ hg add epsilon
|
||||||
@ -91,7 +87,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:ee985f12
|
|
||||||
|
|
||||||
$ echo zeta > zeta
|
$ echo zeta > zeta
|
||||||
$ hg add zeta
|
$ hg add zeta
|
||||||
@ -100,7 +95,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:d21e26b4
|
|
||||||
|
|
||||||
$ echo eta > eta
|
$ echo eta > eta
|
||||||
$ hg add eta
|
$ hg add eta
|
||||||
@ -109,7 +103,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:8c878c97
|
|
||||||
|
|
||||||
$ echo theta > theta
|
$ echo theta > theta
|
||||||
$ hg add theta
|
$ hg add theta
|
||||||
@ -118,7 +111,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:1e03e913
|
|
||||||
|
|
||||||
$ hg log --graph | egrep -v ': *(not-master|master)'
|
$ hg log --graph | egrep -v ': *(not-master|master)'
|
||||||
@ changeset: 8:d3c51ce68cfd
|
@ changeset: 8:d3c51ce68cfd
|
||||||
|
@ -59,7 +59,6 @@ TODO stop using this when we're 1.5 only
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:05c2bcbe
|
|
||||||
|
|
||||||
$ hg branch gamma | grep -v 'permanent and global'
|
$ hg branch gamma | grep -v 'permanent and global'
|
||||||
marked working directory as branch gamma
|
marked working directory as branch gamma
|
||||||
@ -68,7 +67,6 @@ TODO stop using this when we're 1.5 only
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:296802ef
|
|
||||||
|
|
||||||
$ hg log --graph | $filterhash | egrep -v ': *(not-master|master)'
|
$ hg log --graph | $filterhash | egrep -v ': *(not-master|master)'
|
||||||
@ changeset: 2:05aed681ccb3
|
@ changeset: 2:05aed681ccb3
|
||||||
|
@ -54,8 +54,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/tags/alpha => GIT:7eeab2ea
|
|
||||||
default::refs/heads/master => GIT:9a2616b9
|
|
||||||
|
|
||||||
$ hg log --graph | egrep -v ': *(not-master|master)'
|
$ hg log --graph | egrep -v ': *(not-master|master)'
|
||||||
@ changeset: 1:d529e9229f6d
|
@ changeset: 1:d529e9229f6d
|
||||||
|
@ -61,7 +61,6 @@ bail if the user does not have dulwich
|
|||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/beta => GIT:cffa0e8d
|
|
||||||
|
|
||||||
$ cd ..
|
$ cd ..
|
||||||
|
|
||||||
@ -140,7 +139,6 @@ which should not implicitly also push the not-master ref.
|
|||||||
$ hg push -fr master
|
$ hg push -fr master
|
||||||
pushing to $TESTTMP/gitrepo
|
pushing to $TESTTMP/gitrepo
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:cc119202
|
|
||||||
|
|
||||||
$ echo % this should fail, no changes to push
|
$ echo % this should fail, no changes to push
|
||||||
% this should fail, no changes to push
|
% this should fail, no changes to push
|
||||||
|
@ -117,7 +117,6 @@ allow commits despite working copy presense
|
|||||||
pushing to $TESTTMP/gitrepo1
|
pushing to $TESTTMP/gitrepo1
|
||||||
exporting hg objects to git
|
exporting hg objects to git
|
||||||
searching for changes
|
searching for changes
|
||||||
default::refs/heads/master => GIT:4663c492
|
|
||||||
$ cd ..
|
$ cd ..
|
||||||
$ cd gitrepo1
|
$ cd gitrepo1
|
||||||
$ echo % there shall be two gitlink entries, with values matching that in .hgsubstate
|
$ echo % there shall be two gitlink entries, with values matching that in .hgsubstate
|
||||||
|
Loading…
Reference in New Issue
Block a user