diff -r 4372d56112c9 -r a84564b1a0b1 mercurial/help.py --- a/mercurial/help.py Wed May 29 10:00:54 2019 -0400 +++ b/mercurial/help.py Thu May 23 10:47:10 2019 -0400 @@ -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: