# HG changeset patch # User timeless@mozdev.org # Date 2015-10-06 19:07:00 # Node ID b885ab9ca182a1c853975ccf183f3e8fa56ffff3 # Parent 7837653cb39a4fc3b556665edc55c155d7aa85ec rebase: enable histedit for useful help with it diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -217,7 +217,12 @@ def rebase(ui, repo, **opts): 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) diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t --- a/tests/test-rebase-parameters.t +++ b/tests/test-rebase-parameters.t @@ -490,11 +490,11 @@ Test --tool parameter: 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 ..