diff options
| author | Tim Kilbourn <tkilbourn@google.com> | 2013-03-08 15:02:49 -0800 |
|---|---|---|
| committer | Tim Kilbourn <tkilbourn@google.com> | 2013-03-08 16:19:03 -0800 |
| commit | 07669002cbc1cdb3f5587660a140b3203b7fb552 (patch) | |
| tree | ad652eff3898e0961562e085f230e53d7d476349 | |
| parent | 3cba0b8613b2fd56eb2c78b6f94c26ac26704bd0 (diff) | |
| download | git-repo-07669002cbc1cdb3f5587660a140b3203b7fb552.tar.gz | |
Reload the correct manifest during sync.
Fix for issue #134
https://code.google.com/p/git-repo/issues/detail?id=134
Change-Id: I94c2dea5dd63917e3f9c90cbd628921d7d61b12a
| -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) |
