From 79360640f4c7d5f044973aa1bdb6fb0f8f311f05 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 31 Aug 2015 15:45:06 -0700 Subject: Add GitcClientCommand class for GITC-specific commands These won't show up as common commands in the help text unless in a GITC client, and will refuse to execute. Change-Id: Iffe82adcc9d6ddde9cb4b204f83ff018042bdab0 --- subcmds/help.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'subcmds/help.py') diff --git a/subcmds/help.py b/subcmds/help.py index ae5b8f08..9bb4c8c7 100644 --- a/subcmds/help.py +++ b/subcmds/help.py @@ -19,7 +19,7 @@ import sys from formatter import AbstractFormatter, DumbWriter from color import Coloring -from command import PagedCommand, MirrorSafeCommand, RequiresGitcCommand +from command import PagedCommand, MirrorSafeCommand, GitcAvailableCommand, GitcClientCommand import gitc_utils class Help(PagedCommand, MirrorSafeCommand): @@ -57,8 +57,12 @@ Displays detailed usage information about a command. print('The most commonly used repo commands are:') def gitc_supported(cmd): - if not isinstance(cmd, RequiresGitcCommand): + if not isinstance(cmd, GitcAvailableCommand) and not isinstance(cmd, GitcClientCommand): return True + if self.manifest.isGitcClient: + return True + if isinstance(cmd, GitcClientCommand): + return False if gitc_utils.get_gitc_manifest_dir(): return True return False -- cgit v1.2.3-54-g00ecf