D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

ngoldbaum (Nathan Goldbaum) phabricator at mercurial-scm.org
Sun May 26 17:06:20 EDT 2019


ngoldbaum updated this revision to Diff 15268.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6441?vs=15258&id=15268

REVISION DETAIL
  https://phab.mercurial-scm.org/D6441

AFFECTED FILES
  mercurial/help.py

CHANGE DETAILS

diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -689,6 +689,8 @@
             for names, header, doc in subtopics[name]:
                 if subtopic in names:
                     break
+            if not any(subtopic in s[0] for s in subtopics[name]):
+                raise error.UnknownCommand(name)
 
         if not header:
             for topic in helptable:



To: ngoldbaum, #hg-reviewers, martinvonz
Cc: pulkit, martinvonz, av6, mercurial-devel


More information about the Mercurial-devel mailing list