[PATCH 2 of 2] histedit: always abort with same message when working dir is wrong

Simon Heimberg simohe at besonet.ch
Sat Feb 9 08:43:42 CST 2013


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1375540813 -7200
# Branch stable
# Node ID b6556d3ef35f5b6b8e73e1ac9273b1ba3e929a43
# Parent  55d5658e8a2ccdb8f2cc3201959cd664fb3d9b9f
histedit: always abort with same message when working dir is wrong.

Using only one message makes live easier for translators. The clearer
error message was supposed by Augie Fackler.

diff -r 55d5658e8a2c -r b6556d3ef35f hgext/histedit.py
--- a/hgext/histedit.py	Sam Aug 03 16:37:17 2013 +0200
+++ b/hgext/histedit.py	Sam Aug 03 16:40:13 2013 +0200
@@ -583,7 +583,7 @@
     if not newchildren:
         # `parentctxnode` should match but no result. This means that
         # currentnode is not a descendant from parentctxnode.
-        msg = _('working directory parent is not a descendant of %s')
+        msg = _('%s is not an ancestor of working directory')
         hint = _('update to %s or descendant and run "hg histedit '
                  '--continue" again') % parentctx
         raise util.Abort(msg % parentctx, hint=hint)
diff -r 55d5658e8a2c -r b6556d3ef35f tests/test-histedit-edit.t
--- a/tests/test-histedit-edit.t	Sam Aug 03 16:37:17 2013 +0200
+++ b/tests/test-histedit-edit.t	Sam Aug 03 16:40:13 2013 +0200
@@ -73,7 +73,7 @@
   $ hg up 0
   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
   $ HGEDITOR='echo foobaz > ' hg histedit --continue
-  abort: working directory parent is not a descendant of 055a42cdd887
+  abort: 055a42cdd887 is not an ancestor of working directory
   (update to 055a42cdd887 or descendant and run "hg histedit --continue" again)
   [255]
   $ hg up 3


More information about the Mercurial-devel mailing list