# HG changeset patch # User liscju # Date 2016-09-01 20:06:42 # Node ID b1ebc767563d95db3dfff69a17f155a1f3fd93c0 # Parent 02c150850e162a853f1d266eae3632e63fb016bb help: show content for explicitly disabled extension (issue5228) diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -22,6 +22,7 @@ from . import ( ) _extensions = {} +_disabledextensions = {} _aftercallbacks = {} _order = [] _builtin = set(['hbisect', 'bookmarks', 'parentrevspec', 'progress', 'interhg', @@ -148,6 +149,7 @@ def loadall(ui): for (name, path) in result: if path: if path[0] == '!': + _disabledextensions[name] = path[1:] continue try: load(ui, name, path) @@ -370,6 +372,7 @@ def _disabledpaths(strip_init=False): if name in exts or name in _order or name == '__init__': continue exts[name] = path + exts.update(_disabledextensions) return exts def _moduledoc(file): diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1624,6 +1624,17 @@ such str.lower(). > ambiguous = ! > EOF +Show help content of disabled extensions + + $ cat >> $HGRCPATH < [extensions] + > ambiguous = !./ambiguous.py + > EOF + $ hg help -e ambiguous + ambiguous extension - (no help text available) + + (use "hg help extensions" for information on enabling extensions) + Test dynamic list of merge tools only shows up once $ hg help merge-tools Merge Tools