changeset 4269:d2599da04bb5 stable

evolve: update the abort to a ProgrammingError This error should be a ProgrammingError and as Pierre-Yves David said ProgrammingError type did not existed when this code was written, so lets update this now.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Tue, 27 Nov 2018 03:46:06 +0100
parents 4d62095d9fe6
children c8f96f4cb600 aab3827bd12c 7edc5c148df0
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Tue Nov 20 11:33:38 2018 -0500
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Nov 27 03:46:06 2018 +0100
@@ -772,17 +772,18 @@
     returns the node of new commit which is formed
     """
     if orig.rev() == dest.rev():
-        raise error.Abort(_('tried to relocate a node on top of itself'),
-                          hint=_("This shouldn't happen. If you still "
-                                 "need to move changesets, please do so "
-                                 "manually with nothing to rebase - working "
-                                 "directory parent is also destination"))
+        msg = _('tried to relocate a node on top of itself')
+        hint = _("This shouldn't happen. If you still need to move changesets, "
+                 "please do so manually with nothing to rebase - working "
+                 "directory parent is also destination")
+        raise error.ProgrammingError(msg, hint=hint)
 
     if pctx is None:
         if len(orig.parents()) == 2:
-            raise error.Abort(_("tried to relocate a merge commit without "
-                                "specifying which parent should be moved"),
-                              hint=_("Specify the parent by passing in pctx"))
+            msg = _("tried to relocate a merge commit without specifying which "
+                    "parent should be moved")
+            hint = _("Specify the parent by passing in pctx")
+            raise error.ProgrammingError(msg, hint)
         pctx = orig.p1()
 
     commitmsg = orig.description()