From 03ff276cd70e78639232d2e878d972f15ebcd461 Mon Sep 17 00:00:00 2001 From: Jack Neus Date: Fri, 15 Oct 2021 15:43:19 +0000 Subject: [PATCH] sync: properly handle standalone manifests for `sync` command sync should not attempt to sync the manifest project if it was created from a standalone manifest. The current work around is to run sync with --nmu. BUG=none TEST=manual runs Change-Id: I2e121af0badf9642143e77c7af89d1c2d993b0f3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/321195 Tested-by: Jack Neus Reviewed-by: Mike Frysinger --- subcmds/sync.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 7318516c..01704095 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -969,14 +969,16 @@ later is required to fix a server side protocol bug. file=sys.stderr) mp = self.manifest.manifestProject - mp.PreSync() + is_standalone_manifest = mp.config.GetString('manifest.standalone') + if not is_standalone_manifest: + mp.PreSync() if opt.repo_upgraded: _PostRepoUpgrade(self.manifest, quiet=opt.quiet) if not opt.mp_update: print('Skipping update of local manifest project.') - else: + elif not is_standalone_manifest: self._UpdateManifestProject(opt, mp, manifest_name) load_local_manifests = not self.manifest.HasLocalManifests