# HG changeset patch # User Mads Kiilerich # Date 2014-11-01 18:02:31 # Node ID d9e3f50557724ac9f9dcf83c0d3b8bf463e13b2c # Parent 7a3f715dfa90dc11699f61bbfbf93f1918e152d8 help: don't crash on help for 'sections' with multiple '.' 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