Patchwork [3,of,3] rebase: enable histedit for useful help with it

login
register
mail settings
Submitter timeless@mozdev.org
Date Oct. 6, 2015, 7:17 p.m.
Message ID <28d023fec977bceb6ccf.1444159067@waste.org>
Download mbox | patch
Permalink /patch/10834/
State Accepted
Headers show

Comments

timeless@mozdev.org - Oct. 6, 2015, 7:17 p.m.
# HG changeset patch
# User timeless@mozdev.org
# Date 1444158420 14400
#      Tue Oct 06 15:07:00 2015 -0400
# Node ID 28d023fec977bceb6ccfc5441e0a5146a3455c8f
# Parent  47c5d80f778bd879aaaf4e38611e3a8677d42cf2
rebase: enable histedit for useful help with it
Pierre-Yves David - Oct. 6, 2015, 10:05 p.m.
On 10/06/2015 12:17 PM, timeless@mozdev.org wrote:
> # HG changeset patch
> # User timeless@mozdev.org
> # Date 1444158420 14400
> #      Tue Oct 06 15:07:00 2015 -0400
> # Node ID 28d023fec977bceb6ccfc5441e0a5146a3455c8f
> # Parent  47c5d80f778bd879aaaf4e38611e3a8677d42cf2
> rebase: enable histedit for useful help with it

Nice, pushed to the clowncopter. Can I get your to move the hint into 
the actual Abort(msg, hint=XXX) ?

test-rebase-parameters.t said hi.

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -217,7 +217,12 @@ 
         keepopen = opts.get('keepopen', False)
 
         if opts.get('interactive'):
-            help = "hg help -e histedit"
+            try:
+                if extensions.find('histedit'):
+                    enablehistedit = ''
+            except KeyError:
+                enablehistedit = " --config extensions.histedit="
+            help = "hg%s help -e histedit" % enablehistedit
             msg = _("interactive history editing is supported by the "
                     "'histedit' extension (see \"%s\")") % help
             raise util.Abort(msg)