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

login
register
mail settings
Submitter phabricator
Date May 29, 2019, 5:35 p.m.
Message ID <c5ae586649be63a58b0114c3e6df61fc@localhost.localdomain>
Download mbox | patch
Permalink /patch/40269/
State Not Applicable
Headers show

Comments

phabricator - May 29, 2019, 5:35 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa84564b1a0b1: help: check if a subtopic exists and raise an error if it doesn&#039;t (issue6145) (authored by ngoldbaum, committed by ).

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/help.py

CHANGE DETAILS




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

Patch

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: