diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3837,7 +3837,7 @@ def help_(ui, name=None, **opts): section = None if name and '.' in name: - name, section = name.split('.') + name, section = name.split('.', 1) text = help.help_(ui, name, **opts) diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1094,6 +1094,10 @@ Test section lookup abort: help section not found [255] + $ hg help glossary.mc.guffin + abort: help section not found + [255] + Test usage of section marks in help documents $ cd "$TESTDIR"/../doc