mercurial/commands.py
changeset 26364 6e9c2aab9925
parent 26352 e635bc9bb7d9
child 26366 a672cc61ab1d
--- a/mercurial/commands.py	Fri Sep 25 12:38:20 2015 +0800
+++ b/mercurial/commands.py	Fri Sep 25 11:16:20 2015 -0400
@@ -4020,7 +4020,11 @@
 
     formatted, pruned = minirst.format(text, textwidth, keep=keep,
                                        section=section)
-    if section and not formatted:
+
+    # We could have been given a weird ".foo" section without a name
+    # to look for, or we could have simply failed to found "foo.bar"
+    # because bar isn't a section of foo
+    if section and not (formatted and name):
         raise util.Abort(_("help section not found"))
 
     if 'verbose' in pruned: