diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 11 |
1 files 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. | |||
372 | print('\nerror: Exited sync due to gc errors', file=sys.stderr) | 372 | print('\nerror: Exited sync due to gc errors', file=sys.stderr) |
373 | sys.exit(1) | 373 | sys.exit(1) |
374 | 374 | ||
375 | def _ReloadManifest(self, manifest_name=None): | ||
376 | if manifest_name: | ||
377 | # Override calls _Unload already | ||
378 | self.manifest.Override(manifest_name) | ||
379 | else: | ||
380 | self.manifest._Unload() | ||
381 | |||
375 | def UpdateProjectList(self): | 382 | def UpdateProjectList(self): |
376 | new_project_paths = [] | 383 | new_project_paths = [] |
377 | for project in self.GetProjects(None, missing_ok=True): | 384 | for project in self.GetProjects(None, missing_ok=True): |
@@ -571,7 +578,7 @@ later is required to fix a server side protocol bug. | |||
571 | mp.Sync_LocalHalf(syncbuf) | 578 | mp.Sync_LocalHalf(syncbuf) |
572 | if not syncbuf.Finish(): | 579 | if not syncbuf.Finish(): |
573 | sys.exit(1) | 580 | sys.exit(1) |
574 | self.manifest._Unload() | 581 | self._ReloadManifest(opt.manifest_name) |
575 | if opt.jobs is None: | 582 | if opt.jobs is None: |
576 | self.jobs = self.manifest.default.sync_j | 583 | self.jobs = self.manifest.default.sync_j |
577 | all_projects = self.GetProjects(args, | 584 | all_projects = self.GetProjects(args, |
@@ -596,7 +603,7 @@ later is required to fix a server side protocol bug. | |||
596 | # Iteratively fetch missing and/or nested unregistered submodules | 603 | # Iteratively fetch missing and/or nested unregistered submodules |
597 | previously_missing_set = set() | 604 | previously_missing_set = set() |
598 | while True: | 605 | while True: |
599 | self.manifest._Unload() | 606 | self._ReloadManifest(opt.manifest_name) |
600 | all_projects = self.GetProjects(args, | 607 | all_projects = self.GetProjects(args, |
601 | missing_ok=True, | 608 | missing_ok=True, |
602 | submodules_ok=opt.fetch_submodules) | 609 | submodules_ok=opt.fetch_submodules) |