Patchwork commands: support hg help scripting.HGPLAIN

login
register
mail settings
Submitter timeless@mozdev.org
Date Sept. 3, 2015, 4:03 a.m.
Message ID <37f96e61740e24e54665.1441252988@waste.org>
Download mbox | patch
Permalink /patch/10379/
State Accepted
Headers show

Comments

timeless@mozdev.org - Sept. 3, 2015, 4:03 a.m.
# HG changeset patch
# User timeless@mozdev.org
# Date 1441252245 14400
#      Wed Sep 02 23:50:45 2015 -0400
# Node ID 37f96e61740e24e546657ab6eae1cad487e94f59
# Parent  fd9b1262f0e4fbcec1f66f01839bf3d4ee4cff59
commands: support hg help scripting.HGPLAIN

keywords are lowercased within help/minirst...
Matt Mackall - Sept. 3, 2015, 11:05 p.m.
On Wed, 2015-09-02 at 23:03 -0500, timeless@mozdev.org wrote:
> # HG changeset patch
> # User timeless@mozdev.org
> # Date 1441252245 14400
> #      Wed Sep 02 23:50:45 2015 -0400
> # Node ID 37f96e61740e24e546657ab6eae1cad487e94f59
> # Parent  fd9b1262f0e4fbcec1f66f01839bf3d4ee4cff59
> commands: support hg help scripting.HGPLAIN

Queued for default, thanks.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3971,6 +3971,7 @@ 
     section = None
     if name and '.' in name:
         name, section = name.split('.', 1)
+        section = section.lower()
 
     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
@@ -922,6 +922,10 @@ 
       "smtp.host"
           Host name of mail server, e.g. "mail.example.com".
   
+Test capitalized section name
+
+  $ hg help scripting.HGPLAIN > /dev/null
+
 Test templating help
 
   $ hg help templating | egrep '(desc|diffstat|firstline|nonempty)  '