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:
parent
082487dcd1
commit
8914b1f86d
13 changed files with 23 additions and 523 deletions
|
@ -13,15 +13,13 @@
|
|||
# limitations under the License.
|
||||
|
||||
import functools
|
||||
import os
|
||||
import sys
|
||||
|
||||
from command import Command, DEFAULT_LOCAL_JOBS
|
||||
from git_config import IsImmutable
|
||||
from git_command import git
|
||||
import gitc_utils
|
||||
from progress import Progress
|
||||
from project import SyncBuffer, Project
|
||||
from project import Project
|
||||
from typing import NamedTuple
|
||||
from error import RepoExitError
|
||||
|
||||
|
@ -115,49 +113,9 @@ revision specified in the manifest.
|
|||
|
||||
all_projects = self.GetProjects(
|
||||
projects,
|
||||
missing_ok=bool(self.gitc_manifest),
|
||||
all_manifests=not opt.this_manifest_only,
|
||||
)
|
||||
|
||||
# This must happen after we find all_projects, since GetProjects may
|
||||
# need the local directory, which will disappear once we save the GITC
|
||||
# manifest.
|
||||
if self.gitc_manifest:
|
||||
gitc_projects = self.GetProjects(
|
||||
projects, manifest=self.gitc_manifest, missing_ok=True
|
||||
)
|
||||
for project in gitc_projects:
|
||||
if project.old_revision:
|
||||
project.already_synced = True
|
||||
else:
|
||||
project.already_synced = False
|
||||
project.old_revision = project.revisionExpr
|
||||
project.revisionExpr = None
|
||||
# Save the GITC manifest.
|
||||
gitc_utils.save_manifest(self.gitc_manifest)
|
||||
|
||||
# Make sure we have a valid CWD.
|
||||
if not os.path.exists(os.getcwd()):
|
||||
os.chdir(self.manifest.topdir)
|
||||
|
||||
pm = Progress("Syncing %s" % nb, len(all_projects), quiet=opt.quiet)
|
||||
for project in all_projects:
|
||||
gitc_project = self.gitc_manifest.paths[project.relpath]
|
||||
# Sync projects that have not been opened.
|
||||
if not gitc_project.already_synced:
|
||||
proj_localdir = os.path.join(
|
||||
self.gitc_manifest.gitc_client_dir, project.relpath
|
||||
)
|
||||
project.worktree = proj_localdir
|
||||
if not os.path.exists(proj_localdir):
|
||||
os.makedirs(proj_localdir)
|
||||
project.Sync_NetworkHalf()
|
||||
sync_buf = SyncBuffer(self.manifest.manifestProject.config)
|
||||
project.Sync_LocalHalf(sync_buf)
|
||||
project.revisionId = gitc_project.old_revision
|
||||
pm.update(msg="")
|
||||
pm.end()
|
||||
|
||||
def _ProcessResults(_pool, pm, results):
|
||||
for result in results:
|
||||
if result.error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue