diff options
author | Dan Willemsen <dwillemsen@google.com> | 2015-08-31 15:45:06 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2015-09-01 12:23:56 -0700 |
commit | 9ff2ece6abc5d0d4a69c2f086209f107fd4f04be (patch) | |
tree | 1daabfe078e59b38ba0a1fdf9f6b0c83bcf7eba9 /main.py | |
parent | 2487cb7b2c41506c8ef900dba735876b01c67eab (diff) | |
download | git-repo-9ff2ece6abc5d0d4a69c2f086209f107fd4f04be.tar.gz |
gitc: Improve help visibilityv1.12.28
This improves the visiblity of gitc-init if we can get the gitc config,
and hides it otherwise.
Change-Id: I82830b0b07c311e8c74397ba79eb4c361f8b6fb5
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -42,6 +42,7 @@ from git_command import git, GitCommand | |||
42 | from git_config import init_ssh, close_ssh | 42 | from git_config import init_ssh, close_ssh |
43 | from command import InteractiveCommand | 43 | from command import InteractiveCommand |
44 | from command import MirrorSafeCommand | 44 | from command import MirrorSafeCommand |
45 | from command import RequiresGitcCommand | ||
45 | from subcmds.version import Version | 46 | from subcmds.version import Version |
46 | from editor import Editor | 47 | from editor import Editor |
47 | from error import DownloadError | 48 | from error import DownloadError |
@@ -143,6 +144,11 @@ class _Repo(object): | |||
143 | file=sys.stderr) | 144 | file=sys.stderr) |
144 | return 1 | 145 | return 1 |
145 | 146 | ||
147 | if isinstance(cmd, RequiresGitcCommand) and not gitc_utils.get_gitc_manifest_dir(): | ||
148 | print("fatal: '%s' requires GITC to be available" % name, | ||
149 | file=sys.stderr) | ||
150 | return 1 | ||
151 | |||
146 | try: | 152 | try: |
147 | copts, cargs = cmd.OptionParser.parse_args(argv) | 153 | copts, cargs = cmd.OptionParser.parse_args(argv) |
148 | copts = cmd.ReadEnvironmentOptions(copts) | 154 | copts = cmd.ReadEnvironmentOptions(copts) |