summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaman Tenneti <rtenneti@google.com>2021-05-07 10:22:16 -0700
committerRaman Tenneti <rtenneti@google.com>2021-05-07 20:15:50 +0000
commitf907ced0fead284b733872d9d5fd950996e52e9e (patch)
treee4f621fbd049fa10f343c9f01165e550cc9e16d9
parentb44294395f44352d6d9592e896587dd46eea5b6d (diff)
downloadgit-repo-f907ced0fead284b733872d9d5fd950996e52e9e.tar.gz
sync: Recommend using --no-use-superproject if sync fails.
If superproject was not available for a branch, then the next repo sync would also fail because --use-superproject is remembered across repo init. In such cases, hoping the hint to to use --no-use-superproject will help. Tested the code with the following commands and by forcing a failure. $ ./run_tests -v Bug: [google internal] b/187459275 Change-Id: Ie250812b7ba83afc230b5b1d154ba11f245f8b8a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305622 Reviewed-by: Xin Li <delphij@google.com> Tested-by: Raman Tenneti <rtenneti@google.com>
-rw-r--r--subcmds/sync.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 381e9e77..4d95b023 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -307,7 +307,8 @@ later is required to fix a server side protocol bug.
307 submodules_ok=opt.fetch_submodules) 307 submodules_ok=opt.fetch_submodules)
308 manifest_path = superproject.UpdateProjectsRevisionId(all_projects) 308 manifest_path = superproject.UpdateProjectsRevisionId(all_projects)
309 if not manifest_path: 309 if not manifest_path:
310 print('error: Update of revsionId from superproject has failed', 310 print('error: Update of revsionId from superproject has failed. '
311 'Please resync with --no-use-superproject option',
311 file=sys.stderr) 312 file=sys.stderr)
312 sys.exit(1) 313 sys.exit(1)
313 self._ReloadManifest(manifest_path, load_local_manifests) 314 self._ReloadManifest(manifest_path, load_local_manifests)