summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py29
1 files changed, 6 insertions, 23 deletions
diff --git a/main.py b/main.py
index ffed0b72..126a4b61 100755
--- a/main.py
+++ b/main.py
@@ -45,7 +45,6 @@ from git_config import RepoConfig
45from git_trace2_event_log import EventLog 45from git_trace2_event_log import EventLog
46from command import InteractiveCommand 46from command import InteractiveCommand
47from command import MirrorSafeCommand 47from command import MirrorSafeCommand
48from command import GitcAvailableCommand, GitcClientCommand
49from subcmds.version import Version 48from subcmds.version import Version
50from editor import Editor 49from editor import Editor
51from error import DownloadError 50from error import DownloadError
@@ -58,8 +57,8 @@ from error import RepoExitError
58from error import RepoUnhandledExceptionError 57from error import RepoUnhandledExceptionError
59from error import RepoError 58from error import RepoError
60from error import SilentRepoExitError 59from error import SilentRepoExitError
61import gitc_utils 60from error import GitcUnsupportedError
62from manifest_xml import GitcClient, RepoClient 61from manifest_xml import RepoClient
63from pager import RunPager, TerminatePager 62from pager import RunPager, TerminatePager
64from wrapper import WrapperPath, Wrapper 63from wrapper import WrapperPath, Wrapper
65 64
@@ -304,11 +303,10 @@ class _Repo(object):
304 submanifest_path=gopts.submanifest_path, 303 submanifest_path=gopts.submanifest_path,
305 outer_client=outer_client, 304 outer_client=outer_client,
306 ) 305 )
307 gitc_manifest = None 306
308 gitc_client_name = gitc_utils.parse_clientdir(os.getcwd()) 307 if Wrapper().gitc_parse_clientdir(os.getcwd()):
309 if gitc_client_name: 308 print("GITC is not supported.", file=sys.stderr)
310 gitc_manifest = GitcClient(self.repodir, gitc_client_name) 309 raise GitcUnsupportedError()
311 repo_client.isGitcClient = True
312 310
313 try: 311 try:
314 cmd = self.commands[name]( 312 cmd = self.commands[name](
@@ -317,7 +315,6 @@ class _Repo(object):
317 manifest=repo_client.manifest, 315 manifest=repo_client.manifest,
318 outer_client=outer_client, 316 outer_client=outer_client,
319 outer_manifest=outer_client.manifest, 317 outer_manifest=outer_client.manifest,
320 gitc_manifest=gitc_manifest,
321 git_event_log=git_trace2_event_log, 318 git_event_log=git_trace2_event_log,
322 ) 319 )
323 except KeyError: 320 except KeyError:
@@ -336,20 +333,6 @@ class _Repo(object):
336 ) 333 )
337 return 1 334 return 1
338 335
339 if (
340 isinstance(cmd, GitcAvailableCommand)
341 and not gitc_utils.get_gitc_manifest_dir()
342 ):
343 print(
344 "fatal: '%s' requires GITC to be available" % name,
345 file=sys.stderr,
346 )
347 return 1
348
349 if isinstance(cmd, GitcClientCommand) and not gitc_client_name:
350 print("fatal: '%s' requires a GITC client" % name, file=sys.stderr)
351 return 1
352
353 try: 336 try:
354 copts, cargs = cmd.OptionParser.parse_args(argv) 337 copts, cargs = cmd.OptionParser.parse_args(argv)
355 copts = cmd.ReadEnvironmentOptions(copts) 338 copts = cmd.ReadEnvironmentOptions(copts)