diff mercurial/merge.py @ 19798:76df01e56e7f

update: improve error message for clean non-linear update
author Siddharth Agarwal <sid0@fb.com>
date Mon, 23 Sep 2013 17:43:33 -0700
parents 499fc471296b
children ab3e42225dbc
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Sep 23 19:02:32 2013 -0700
+++ b/mercurial/merge.py	Mon Sep 23 17:43:33 2013 -0700
@@ -664,7 +664,7 @@
 
     x = can't happen
     * = don't-care
-    1 = abort: crosses branches (use 'hg merge' or 'hg update -c')
+    1 = abort: not a linear update (merge or update --check to force update)
     2 = abort: crosses branches (use 'hg merge' to merge or
                  use 'hg update -C' to discard changes)
     3 = abort: uncommitted local changes
@@ -731,9 +731,9 @@
                                 " --clean to discard changes)")
                         raise util.Abort(msg)
                     else:  # node is none
-                        msg = _("crosses branches (merge branches or update"
-                                " --check to force update)")
-                        raise util.Abort(msg)
+                        msg = _("not a linear update")
+                        hint = _("merge or update --check to force update")
+                        raise util.Abort(msg, hint=hint)
                 else:
                     # Allow jumping branches if clean and specific rev given
                     pa = p1