diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index b15d9477..8d89cf72 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -302,21 +302,25 @@ later is required to fix a server side protocol bug. | |||
302 | load_local_manifests: Whether to load local manifests. | 302 | load_local_manifests: Whether to load local manifests. |
303 | 303 | ||
304 | Returns: | 304 | Returns: |
305 | Returns path to the overriding manifest file. | 305 | Returns path to the overriding manifest file instead of None. |
306 | """ | 306 | """ |
307 | superproject = git_superproject.Superproject(self.manifest, | 307 | superproject = git_superproject.Superproject(self.manifest, |
308 | self.repodir, | 308 | self.repodir, |
309 | self.git_event_log, | ||
309 | quiet=opt.quiet) | 310 | quiet=opt.quiet) |
310 | all_projects = self.GetProjects(args, | 311 | all_projects = self.GetProjects(args, |
311 | missing_ok=True, | 312 | missing_ok=True, |
312 | submodules_ok=opt.fetch_submodules) | 313 | submodules_ok=opt.fetch_submodules) |
313 | manifest_path = superproject.UpdateProjectsRevisionId(all_projects) | 314 | update_result = superproject.UpdateProjectsRevisionId(all_projects) |
314 | if not manifest_path: | 315 | manifest_path = update_result.manifest_path |
316 | if manifest_path: | ||
317 | self._ReloadManifest(manifest_path, load_local_manifests) | ||
318 | else: | ||
315 | print('error: Update of revsionId from superproject has failed. ' | 319 | print('error: Update of revsionId from superproject has failed. ' |
316 | 'Please resync with --no-use-superproject option', | 320 | 'Please resync with --no-use-superproject option', |
317 | file=sys.stderr) | 321 | file=sys.stderr) |
318 | sys.exit(1) | 322 | if update_result.fatal: |
319 | self._ReloadManifest(manifest_path, load_local_manifests) | 323 | sys.exit(1) |
320 | return manifest_path | 324 | return manifest_path |
321 | 325 | ||
322 | def _FetchProjectList(self, opt, projects): | 326 | def _FetchProjectList(self, opt, projects): |
@@ -961,7 +965,9 @@ later is required to fix a server side protocol bug. | |||
961 | 965 | ||
962 | load_local_manifests = not self.manifest.HasLocalManifests | 966 | load_local_manifests = not self.manifest.HasLocalManifests |
963 | if self._UseSuperproject(opt): | 967 | if self._UseSuperproject(opt): |
964 | manifest_name = self._UpdateProjectsRevisionId(opt, args, load_local_manifests) | 968 | new_manifest_name = self._UpdateProjectsRevisionId(opt, args, load_local_manifests) |
969 | if not new_manifest_name: | ||
970 | manifest_name = new_manifest_name | ||
965 | 971 | ||
966 | if self.gitc_manifest: | 972 | if self.gitc_manifest: |
967 | gitc_manifest_projects = self.GetProjects(args, | 973 | gitc_manifest_projects = self.GetProjects(args, |