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 <jackneus@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Jack Neus 2021-10-15 15:43:19 +00:00
parent 4ee4a45d03
commit 03ff276cd7

View File

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