diff options
Diffstat (limited to 'subcmds/help.py')
-rw-r--r-- | subcmds/help.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/subcmds/help.py b/subcmds/help.py index 593bf676..0d7b664e 100644 --- a/subcmds/help.py +++ b/subcmds/help.py | |||
@@ -21,10 +21,7 @@ from color import Coloring | |||
21 | from command import ( | 21 | from command import ( |
22 | PagedCommand, | 22 | PagedCommand, |
23 | MirrorSafeCommand, | 23 | MirrorSafeCommand, |
24 | GitcAvailableCommand, | ||
25 | GitcClientCommand, | ||
26 | ) | 24 | ) |
27 | import gitc_utils | ||
28 | from wrapper import Wrapper | 25 | from wrapper import Wrapper |
29 | from error import RepoExitError | 26 | from error import RepoExitError |
30 | 27 | ||
@@ -79,26 +76,9 @@ Displays detailed usage information about a command. | |||
79 | def PrintCommonCommandsBody(self): | 76 | def PrintCommonCommandsBody(self): |
80 | print("The most commonly used repo commands are:") | 77 | print("The most commonly used repo commands are:") |
81 | 78 | ||
82 | def gitc_supported(cmd): | ||
83 | if not isinstance(cmd, GitcAvailableCommand) and not isinstance( | ||
84 | cmd, GitcClientCommand | ||
85 | ): | ||
86 | return True | ||
87 | if self.client.isGitcClient: | ||
88 | return True | ||
89 | if isinstance(cmd, GitcClientCommand): | ||
90 | return False | ||
91 | if gitc_utils.get_gitc_manifest_dir(): | ||
92 | return True | ||
93 | return False | ||
94 | |||
95 | commandNames = list( | 79 | commandNames = list( |
96 | sorted( | 80 | sorted( |
97 | [ | 81 | name for name, command in all_commands.items() if command.COMMON |
98 | name | ||
99 | for name, command in all_commands.items() | ||
100 | if command.COMMON and gitc_supported(command) | ||
101 | ] | ||
102 | ) | 82 | ) |
103 | ) | 83 | ) |
104 | self._PrintCommands(commandNames) | 84 | self._PrintCommands(commandNames) |