From f907ced0fead284b733872d9d5fd950996e52e9e Mon Sep 17 00:00:00 2001 From: Raman Tenneti Date: Fri, 7 May 2021 10:22:16 -0700 Subject: [PATCH] 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 Tested-by: Raman Tenneti --- subcmds/sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 381e9e7..4d95b02 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -307,7 +307,8 @@ later is required to fix a server side protocol bug. submodules_ok=opt.fetch_submodules) manifest_path = superproject.UpdateProjectsRevisionId(all_projects) if not manifest_path: - print('error: Update of revsionId from superproject has failed', + print('error: Update of revsionId from superproject has failed. ' + 'Please resync with --no-use-superproject option', file=sys.stderr) sys.exit(1) self._ReloadManifest(manifest_path, load_local_manifests)