[PATCH 2 of 2] outgoing: display info about secret changets while no sharable changeset found
alain.leufroy at gmail.com
alain.leufroy at gmail.com
Wed Jan 25 18:44:15 UTC 2012
# HG changeset patch
# User Alain Leufroy <alain.leufroyATgmailMYDOTcom>
# Date 1327516894 -3600
# Node ID 799fdab1cde20fcebad4861a1deb0e3686cecf23
# Parent 8bf41694f8dcc90a434e7bd701ebf4d58a20a22a
outgoing: display info about secret changets while no sharable changeset found
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -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
diff --git a/tests/test-incoming-outgoing.t b/tests/test-incoming-outgoing.t
--- a/tests/test-incoming-outgoing.t
+++ b/tests/test-incoming-outgoing.t
@@ -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
More information about the Mercurial-devel
mailing list