gitc: drop support

Bug: b/282775958
Change-Id: Ib6383d6fd82a017d0a6670d6558a905d41be321f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375314
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Jason Chang <jasonnc@google.com>
Commit-Queue: Jason Chang <jasonnc@google.com>
This commit is contained in:
Jason Chang
2023-05-26 12:44:50 -07:00
committed by LUCI
parent 082487dcd1
commit 8914b1f86d
13 changed files with 23 additions and 523 deletions

29
main.py
View File

@ -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)