From 07669002cbc1cdb3f5587660a140b3203b7fb552 Mon Sep 17 00:00:00 2001 From: Tim Kilbourn Date: Fri, 8 Mar 2013 15:02:49 -0800 Subject: [PATCH] Reload the correct manifest during sync. Fix for issue #134 https://code.google.com/p/git-repo/issues/detail?id=134 Change-Id: I94c2dea5dd63917e3f9c90cbd628921d7d61b12a --- subcmds/sync.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 6c903ff4..9ed84b90 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -372,6 +372,13 @@ later is required to fix a server side protocol bug. print('\nerror: Exited sync due to gc errors', file=sys.stderr) sys.exit(1) + def _ReloadManifest(self, manifest_name=None): + if manifest_name: + # Override calls _Unload already + self.manifest.Override(manifest_name) + else: + self.manifest._Unload() + def UpdateProjectList(self): new_project_paths = [] for project in self.GetProjects(None, missing_ok=True): @@ -571,7 +578,7 @@ later is required to fix a server side protocol bug. mp.Sync_LocalHalf(syncbuf) if not syncbuf.Finish(): sys.exit(1) - self.manifest._Unload() + self._ReloadManifest(opt.manifest_name) if opt.jobs is None: self.jobs = self.manifest.default.sync_j all_projects = self.GetProjects(args, @@ -596,7 +603,7 @@ later is required to fix a server side protocol bug. # Iteratively fetch missing and/or nested unregistered submodules previously_missing_set = set() while True: - self.manifest._Unload() + self._ReloadManifest(opt.manifest_name) all_projects = self.GetProjects(args, missing_ok=True, submodules_ok=opt.fetch_submodules)