changeset 15992:963c8a553524 stable

outgoing: display info about secret changets while no sharable changeset found
author Alain Leufroy <alain.leufroyATgmailMYDOTcom>
date Wed, 25 Jan 2012 19:41:34 +0100
parents 85ec8036d0b9
children 0b05e0bfdc1c
files mercurial/hg.py tests/test-incoming-outgoing.t
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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