From 4112c07688d0e0e568478e9f42be349bdd511d45 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Wed, 24 Aug 2022 17:32:25 +0000 Subject: [PATCH] sync: Correctly sync multi manifest workspaces When actually fetching the manifests, start at the correct (sub) manifest. Bug: https://crbug.com/gerrit/16198 Change-Id: I39fdd726f1917ef4277a0b7c83663c8f49167466 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343914 Tested-by: LaMont Jones Reviewed-by: Mike Frysinger --- subcmds/sync.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index a2b376b..de4ac3a 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -1071,14 +1071,13 @@ later is required to fix a server side protocol bug. file=sys.stderr) for m in self.ManifestList(opt): - mp = m.manifestProject - is_standalone_manifest = bool(mp.standalone_manifest_url) - if not is_standalone_manifest: - mp.PreSync() + if not m.manifestProject.standalone_manifest_url: + m.manifestProject.PreSync() - if opt.repo_upgraded: - _PostRepoUpgrade(m, quiet=opt.quiet) + if opt.repo_upgraded: + _PostRepoUpgrade(manifest, quiet=opt.quiet) + mp = manifest.manifestProject if opt.mp_update: self._UpdateAllManifestProjects(opt, mp, manifest_name) else: