Commits

David Carr committed 4bc39fd

push: change "no changes" default output to match normal mercurial

The output for "hg push" when there were no changes didn't quite match between
Mercurial with and without Hg-Git, so I changed the behavior to bring it into
synch. The existing "creating and sending data" message was changed to be
included if --verbose is specified.

Comments (0)

Files changed (16)

 
         genpack = self.git.object_store.generate_pack_contents
         try:
-            self.ui.status(_("creating and sending data\n"))
+            self.ui.status(_("searching for changes\n"))
+            self.ui.note(_("creating and sending data\n"))
             new_refs = client.send_pack(path, changed, genpack)
             return old_refs, new_refs
         except (HangupException, GitProtocolError), e:

tests/test-conflict-1.t

   $ hg push -r master ../gitrepo
   pushing to ../gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
   $ cd ..
 
   $ hg clone gitrepo hgrepo2 | grep -v '^updating'

tests/test-conflict-2.t

   $ hg push -r master ../gitrepo
   pushing to ../gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
   $ cd ..
 
   $ hg clone gitrepo hgrepo2 | grep -v '^updating'

tests/test-convergedmerge.t

   $ hg push -r master ../gitrepo
   pushing to ../gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
   $ cd ..
 
   $ hg clone gitrepo hgrepo2 | grep -v '^updating'

tests/test-empty-working-tree.t

   $ hg push ../gitrepo2
   pushing to ../gitrepo2
   exporting hg objects to git
-  creating and sending data
+  searching for changes
 
   $ cd ../gitrepo2
   $ git log --pretty=medium

tests/test-encoding.t

   $ hg push ../gitrepo2
   pushing to ../gitrepo2
   exporting hg objects to git
-  creating and sending data
+  searching for changes
 
   $ cd ../gitrepo2
   $ git log --pretty=medium

tests/test-file-removal.t

   $ hg push ../gitrepo2
   pushing to ../gitrepo2
   exporting hg objects to git
-  creating and sending data
+  searching for changes
 
   $ cd ../gitrepo2
   $ git log --pretty=medium

tests/test-git-tags.t

   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:3b7fd1b3
 
   $ cd ..

tests/test-hg-author.t

   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:cffa0e8d
 
   $ echo gamma >> beta
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:2b9ec6a4
 
   $ echo gamma > gamma
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:fee30180
 
   $ echo delta > delta
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:d1659250
 
   $ echo epsilon > epsilon
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:ee985f12
 
   $ echo zeta > zeta
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:d21e26b4
 
   $ echo eta > eta
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:8c878c97
 
   $ echo theta > theta
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:1e03e913
 
   $ hg log --graph | egrep -v ': *(not-master|master)'

tests/test-hg-branch.t

   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:05c2bcbe
 
   $ hg branch gamma | grep -v 'permanent and global'
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:296802ef
 
   $ hg log --graph | $filterhash | egrep -v ': *(not-master|master)'
   $ hg push
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/tags/alpha => GIT:7eeab2ea
       default::refs/heads/master => GIT:9a2616b9
 
   $ hg push ../gitrepo2
   pushing to ../gitrepo2
   exporting hg objects to git
-  creating and sending data
+  searching for changes
 
   $ cd ..
   $ cd gitrepo2
   $ hg push ../gitrepo2
   pushing to ../gitrepo2
   exporting hg objects to git
-  creating and sending data
+  searching for changes
 
   $ cd ../gitrepo2
   $ git log --pretty=medium | sed s/\\.\\.\\.//g
   $ hg push -r beta
   pushing to $TESTTMP/gitrepo
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/beta => GIT:cffa0e8d
 
   $ cd ..
   % this should fail
   $ hg push -r master
   pushing to $TESTTMP/gitrepo
-  creating and sending data
+  searching for changes
   abort: refs/heads/master changed on the server, please pull and merge before pushing
   [255]
 
   % ... even with -f
   $ hg push -fr master
   pushing to $TESTTMP/gitrepo
-  creating and sending data
+  searching for changes
   abort: refs/heads/master changed on the server, please pull and merge before pushing
   [255]
 
   % this should also fail
   $ hg push -r master
   pushing to $TESTTMP/gitrepo
-  creating and sending data
+  searching for changes
   abort: pushing refs/heads/master overwrites 72f56395749d
   [255]
 
   % ... but succeed with -f
   $ hg push -fr master
   pushing to $TESTTMP/gitrepo
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:cc119202
 
   $ echo % this should fail, no changes to push
 issue3228 was fixed in 2.1
   $ hg push -r master && false
   pushing to $TESTTMP/gitrepo
-  creating and sending data
+  searching for changes
   no changes found
   [1]
 

tests/test-subrepos.t

   $ hg push
   pushing to $TESTTMP/gitrepo1
   exporting hg objects to git
-  creating and sending data
+  searching for changes
       default::refs/heads/master => GIT:4663c492
   $ cd ..
   $ cd gitrepo1

tests/test-tree-decomposition.t

   $ hg push ../gitrepo2
   pushing to ../gitrepo2
   exporting hg objects to git
-  creating and sending data
+  searching for changes
 
   $ cd ../gitrepo2
   $ git log --pretty=medium