Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 42412:a84564b1a0b1
help: check if a subtopic exists and raise an error if it doesn't (issue6145)
Differential Revision: https://phab.mercurial-scm.org/D6441
author | Nathan Goldbaum <nathan12343@gmail.com> |
---|---|
date | Thu, 23 May 2019 10:47:10 -0400 |
parents | 566daffc607d |
children | ad55a0a5894f |
comparison
equal
deleted
inserted
replaced
42411:4372d56112c9 | 42412:a84564b1a0b1 |
---|---|
687 header, doc = None, None | 687 header, doc = None, None |
688 if subtopic and name in subtopics: | 688 if subtopic and name in subtopics: |
689 for names, header, doc in subtopics[name]: | 689 for names, header, doc in subtopics[name]: |
690 if subtopic in names: | 690 if subtopic in names: |
691 break | 691 break |
692 if not any(subtopic in s[0] for s in subtopics[name]): | |
693 raise error.UnknownCommand(name) | |
692 | 694 |
693 if not header: | 695 if not header: |
694 for topic in helptable: | 696 for topic in helptable: |
695 names, header, doc = topic[0:3] | 697 names, header, doc = topic[0:3] |
696 if name in names: | 698 if name in names: |