mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
Revert "GITC: Always update the gitc manifest from the repo manifest"
This reverts commit 250303b437.
Change-Id: I1fd8af20f802553151aacb953c913f3305ca6057
This commit is contained in:
@@ -670,36 +670,32 @@ later is required to fix a server side protocol bug.
|
||||
if opt.jobs is None:
|
||||
self.jobs = self.manifest.default.sync_j
|
||||
|
||||
# TODO (sbasi) - Add support for manifest changes, aka projects
|
||||
# have been added or deleted from the manifest.
|
||||
if self.gitc_manifest:
|
||||
gitc_manifest_projects = self.GetProjects(args,
|
||||
manifest=self.gitc_manifest,
|
||||
missing_ok=True)
|
||||
gitc_projects = []
|
||||
opened_projects = []
|
||||
for project in gitc_manifest_projects:
|
||||
if project.relpath in self.gitc_manifest.paths and \
|
||||
self.gitc_manifest.paths[project.relpath].old_revision:
|
||||
opened_projects.append(project.relpath)
|
||||
if not project.old_revision:
|
||||
gitc_projects.append(project)
|
||||
else:
|
||||
gitc_projects.append(project.relpath)
|
||||
opened_projects.append(project)
|
||||
|
||||
if not args:
|
||||
gitc_projects = None
|
||||
|
||||
if gitc_projects != [] and not opt.local_only:
|
||||
if gitc_projects and not opt.local_only:
|
||||
print('Updating GITC client: %s' % self.gitc_manifest.gitc_client_name)
|
||||
gitc_utils.generate_gitc_manifest(self.repodir,
|
||||
self.gitc_manifest.gitc_client_name,
|
||||
gitc_utils.generate_gitc_manifest(self.gitc_manifest.gitc_client_dir,
|
||||
self.gitc_manifest,
|
||||
self.manifest.manifestFile,
|
||||
gitc_projects)
|
||||
print('GITC client successfully synced.')
|
||||
|
||||
# The opened projects need to be synced as normal, therefore we
|
||||
# generate a new args list to represent the opened projects.
|
||||
# TODO: make this more reliable -- if there's a project name/path overlap,
|
||||
# this may choose the wrong project.
|
||||
args = [os.path.relpath(self.manifest.paths[p].worktree, os.getcwd())
|
||||
for p in opened_projects]
|
||||
args = []
|
||||
for proj in opened_projects:
|
||||
args.append(os.path.relpath(proj.worktree, os.getcwd()))
|
||||
if not args:
|
||||
return
|
||||
all_projects = self.GetProjects(args,
|
||||
|
||||
Reference in New Issue
Block a user