From 3b038cecc4ff189f9f7263adc5f8bf1ae62f3380 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 May 2021 00:45:19 -0400 Subject: [PATCH] upload: include the project in error messages When running upload across multiple projects, include the project in any error messages that come up. This lets users figure out where the problem might be. Change-Id: I09470c9a1b512baf910d6d97b747816d1a6f3a87 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304783 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- subcmds/upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subcmds/upload.py b/subcmds/upload.py index 50dccc52..a23755c7 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -520,10 +520,10 @@ Gerrit Code Review: https://www.gerritcodereview.com/ avail = [up_branch] else: avail = None - print('repo: error: Unable to upload branch "%s". ' + print('repo: error: %s: Unable to upload branch "%s". ' 'You might be able to fix the branch by running:\n' ' git branch --set-upstream-to m/%s' % - (str(cbr), self.manifest.branch), + (project.relpath, str(cbr), self.manifest.branch), file=sys.stderr) else: avail = project.GetUploadableBranches(branch)