From 8914b1f86db3903e507b26979f6f137907ea3398 Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Fri, 26 May 2023 12:44:50 -0700 Subject: gitc: drop support Bug: b/282775958 Change-Id: Ib6383d6fd82a017d0a6670d6558a905d41be321f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375314 Reviewed-by: Mike Frysinger Tested-by: Jason Chang Commit-Queue: Jason Chang --- main.py | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'main.py') 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 from git_trace2_event_log import EventLog from command import InteractiveCommand from command import MirrorSafeCommand -from command import GitcAvailableCommand, GitcClientCommand from subcmds.version import Version from editor import Editor from error import DownloadError @@ -58,8 +57,8 @@ from error import RepoExitError from error import RepoUnhandledExceptionError from error import RepoError from error import SilentRepoExitError -import gitc_utils -from manifest_xml import GitcClient, RepoClient +from error import GitcUnsupportedError +from manifest_xml import RepoClient from pager import RunPager, TerminatePager from wrapper import WrapperPath, Wrapper @@ -304,11 +303,10 @@ class _Repo(object): submanifest_path=gopts.submanifest_path, outer_client=outer_client, ) - gitc_manifest = None - gitc_client_name = gitc_utils.parse_clientdir(os.getcwd()) - if gitc_client_name: - gitc_manifest = GitcClient(self.repodir, gitc_client_name) - repo_client.isGitcClient = True + + if Wrapper().gitc_parse_clientdir(os.getcwd()): + print("GITC is not supported.", file=sys.stderr) + raise GitcUnsupportedError() try: cmd = self.commands[name]( @@ -317,7 +315,6 @@ class _Repo(object): manifest=repo_client.manifest, outer_client=outer_client, outer_manifest=outer_client.manifest, - gitc_manifest=gitc_manifest, git_event_log=git_trace2_event_log, ) except KeyError: @@ -336,20 +333,6 @@ class _Repo(object): ) return 1 - if ( - isinstance(cmd, GitcAvailableCommand) - and not gitc_utils.get_gitc_manifest_dir() - ): - print( - "fatal: '%s' requires GITC to be available" % name, - file=sys.stderr, - ) - return 1 - - if isinstance(cmd, GitcClientCommand) and not gitc_client_name: - print("fatal: '%s' requires a GITC client" % name, file=sys.stderr) - return 1 - try: copts, cargs = cmd.OptionParser.parse_args(argv) copts = cmd.ReadEnvironmentOptions(copts) -- cgit v1.2.3-54-g00ecf