From 1f2462e0d2dc7002c794936ab81c59c3a9d3cf35 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 3 Aug 2019 01:57:09 -0400 Subject: [PATCH] git_config: include project name in missing ref exception When syncing in parallel, this exception is hard to trace back to a specific repo as the relevant log line could have been pushed out by other repos syncing code. Change-Id: I382efeec7651e85622aa51e351134aef0148267f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/233075 Reviewed-by: David Pursehouse Reviewed-by: Nasser Grainawi Tested-by: Mike Frysinger --- git_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git_config.py b/git_config.py index cdfeddd0..9b3dd25a 100644 --- a/git_config.py +++ b/git_config.py @@ -699,7 +699,8 @@ class Remote(object): if not rev.startswith(R_HEADS): return rev - raise GitError('remote %s does not have %s' % (self.name, rev)) + raise GitError('%s: remote %s does not have %s' % + (self.projectname, self.name, rev)) def WritesTo(self, ref): """True if the remote stores to the tracking ref.