outgoing: display info about secret changets while no sharable changeset found stable
authorAlain Leufroy <alain.leufroyATgmailMYDOTcom>
Wed, 25 Jan 2012 19:41:34 +0100
branchstable
changeset 15992 963c8a553524
parent 15991 85ec8036d0b9
child 15993 0b05e0bfdc1c
outgoing: display info about secret changets while no sharable changeset found
mercurial/hg.py
tests/test-incoming-outgoing.t
--- a/mercurial/hg.py	Wed Jan 25 19:05:16 2012 +0100
+++ b/mercurial/hg.py	Wed Jan 25 19:41:34 2012 +0100
@@ -511,7 +511,11 @@
                                             force=opts.get('force'))
     o = outgoing.missing
     if not o:
-        ui.status(_("no changes found\n"))
+        if outgoing.excluded:
+            repo.ui.status(_("no outgoing changes but %i secret changesets\n")
+                           % len(outgoing.excluded))
+        else:
+            ui.status(_("no changes found\n"))
         return None
     return o
 
--- a/tests/test-incoming-outgoing.t	Wed Jan 25 19:05:16 2012 +0100
+++ b/tests/test-incoming-outgoing.t	Wed Jan 25 19:41:34 2012 +0100
@@ -399,6 +399,15 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     13
   
+test outgoing with secret changesets
+
+  $ hg -R test-dev phase --force --secret 9
+  $ hg -R test-dev outgoing test
+  comparing with test
+  searching for changes
+  no outgoing changes but 5 secret changesets
+  [1]
+  $ hg -R test-dev phase --draft -r 'head()'
 
 limit to 3 changesets