diff mercurial/commands.py @ 15993:0b05e0bfdc1c stable

scmutil: unify some 'no changes found' messages This keeps the wording more consistent for secret csets
author Matt Mackall <mpm@selenic.com>
date Wed, 25 Jan 2012 17:14:08 -0600
parents 85ec8036d0b9
children f1208827df7c
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jan 25 19:41:34 2012 +0100
+++ b/mercurial/commands.py	Wed Jan 25 17:14:08 2012 -0600
@@ -983,6 +983,7 @@
         common = [repo.lookup(rev) for rev in base]
         heads = revs and map(repo.lookup, revs) or revs
         cg = repo.getbundle('bundle', heads=heads, common=common)
+        outgoing = None
     else:
         dest = ui.expandpath(dest or 'default-push', dest or 'default')
         dest, branches = hg.parseurl(dest, opts.get('branch'))
@@ -994,11 +995,7 @@
                                                 force=opts.get('force'))
         cg = repo.getlocalbundle('bundle', outgoing)
     if not cg:
-        if 'outgoing' in locals() and outgoing.excluded:
-            repo.ui.status(_("no changes found but %i secret changesets\n")
-                           % len(outgoing.excluded))
-        else:
-            ui.status(_("no changes found\n"))
+        scmutil.nochangesfound(ui, outgoing and outgoing.excluded)
         return 1
 
     bundletype = opts.get('type', 'bzip2').lower()