diff options
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 29 |
1 files changed, 6 insertions, 23 deletions
| @@ -45,7 +45,6 @@ from git_config import RepoConfig | |||
| 45 | from git_trace2_event_log import EventLog | 45 | from git_trace2_event_log import EventLog |
| 46 | from command import InteractiveCommand | 46 | from command import InteractiveCommand |
| 47 | from command import MirrorSafeCommand | 47 | from command import MirrorSafeCommand |
| 48 | from command import GitcAvailableCommand, GitcClientCommand | ||
| 49 | from subcmds.version import Version | 48 | from subcmds.version import Version |
| 50 | from editor import Editor | 49 | from editor import Editor |
| 51 | from error import DownloadError | 50 | from error import DownloadError |
| @@ -58,8 +57,8 @@ from error import RepoExitError | |||
| 58 | from error import RepoUnhandledExceptionError | 57 | from error import RepoUnhandledExceptionError |
| 59 | from error import RepoError | 58 | from error import RepoError |
| 60 | from error import SilentRepoExitError | 59 | from error import SilentRepoExitError |
| 61 | import gitc_utils | 60 | from error import GitcUnsupportedError |
| 62 | from manifest_xml import GitcClient, RepoClient | 61 | from manifest_xml import RepoClient |
| 63 | from pager import RunPager, TerminatePager | 62 | from pager import RunPager, TerminatePager |
| 64 | from wrapper import WrapperPath, Wrapper | 63 | from 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) |
