rebase: enable histedit for useful help with it
authortimeless@mozdev.org
Tue, 06 Oct 2015 15:07:00 -0400
changeset 26496 b885ab9ca182
parent 26495 7837653cb39a
child 26497 ca778cbe94f3
rebase: enable histedit for useful help with it
hgext/rebase.py
tests/test-rebase-parameters.t
--- a/hgext/rebase.py	Tue Oct 06 15:01:25 2015 -0400
+++ b/hgext/rebase.py	Tue Oct 06 15:07:00 2015 -0400
@@ -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)
--- a/tests/test-rebase-parameters.t	Tue Oct 06 15:01:25 2015 -0400
+++ b/tests/test-rebase-parameters.t	Tue Oct 06 15:07:00 2015 -0400
@@ -490,11 +490,11 @@
   saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob)
 
   $ hg rebase -i
-  abort: interactive history editing is supported by the 'histedit' extension (see "hg help -e histedit")
+  abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit")
   [255]
 
   $ hg rebase --interactive
-  abort: interactive history editing is supported by the 'histedit' extension (see "hg help -e histedit")
+  abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit")
   [255]
 
   $ cd ..