diff mercurial/commands.py @ 15619:6c8573dd1b6b

merge: make 'nothing to merge' aborts consistent Makes the 'nothing to merge' abort messages in commands.py consistent with those in merge.py. Also makes commands.merge() and merge.update() use hints. The tests show the changes.
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 07 Dec 2011 11:23:01 -0600
parents 0aca2695a110
children 73faa2664909
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Dec 07 11:22:57 2011 -0600
+++ b/mercurial/commands.py	Wed Dec 07 11:23:01 2011 -0600
@@ -4042,10 +4042,10 @@
                                    "please merge with an explicit rev")
                                  % branch,
                                  hint=_("run 'hg heads' to see all heads"))
-            msg = _('there is nothing to merge')
+            msg, hint = _('nothing to merge'), None
             if parent != repo.lookup(branch):
-                msg = _('%s - use "hg update" instead') % msg
-            raise util.Abort(msg)
+                hint = _("use 'hg update' instead")
+            raise util.Abort(msg, hint=hint)
 
         if parent not in bheads:
             raise util.Abort(_('working directory not at a head revision'),