summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Neus <jackneus@google.com>2021-10-15 15:43:19 +0000
committerJack Neus <jackneus@google.com>2021-10-15 17:20:00 +0000
commit03ff276cd70e78639232d2e878d972f15ebcd461 (patch)
treee11250c734e6459170f733f5ccf33d04f0edf413
parent4ee4a45d03075c3576afcc08b654a057decaf6be (diff)
downloadgit-repo-03ff276cd70e78639232d2e878d972f15ebcd461.tar.gz
sync: properly handle standalone manifests for `sync` commandv2.17.2
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>
-rw-r--r--subcmds/sync.py6
1 files 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.
969 file=sys.stderr) 969 file=sys.stderr)
970 970
971 mp = self.manifest.manifestProject 971 mp = self.manifest.manifestProject
972 mp.PreSync() 972 is_standalone_manifest = mp.config.GetString('manifest.standalone')
973 if not is_standalone_manifest:
974 mp.PreSync()
973 975
974 if opt.repo_upgraded: 976 if opt.repo_upgraded:
975 _PostRepoUpgrade(self.manifest, quiet=opt.quiet) 977 _PostRepoUpgrade(self.manifest, quiet=opt.quiet)
976 978
977 if not opt.mp_update: 979 if not opt.mp_update:
978 print('Skipping update of local manifest project.') 980 print('Skipping update of local manifest project.')
979 else: 981 elif not is_standalone_manifest:
980 self._UpdateManifestProject(opt, mp, manifest_name) 982 self._UpdateManifestProject(opt, mp, manifest_name)
981 983
982 load_local_manifests = not self.manifest.HasLocalManifests 984 load_local_manifests = not self.manifest.HasLocalManifests