summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorMarc Herbert <marc.herbert@intel.com>2017-04-04 22:03:53 -0700
committerMarc Herbert <marc.herbert@intel.com>2017-04-04 22:10:34 -0700
commitffb4b890997b1799f188ec44f005d949feb643a7 (patch)
tree799140409f36ea5ad1ac57ca72a8eed0085594a7 /subcmds
parent04071c1c72437a930db017bd4c562ad06087986a (diff)
downloadgit-repo-ffb4b890997b1799f188ec44f005d949feb643a7.tar.gz
sync.py: report the remote URL on fatal git remote errors
repo can be configured to download from any number of remote git repos. However when one fails repo doesn't report which one. Example: Fatal: remote error: Daily ls-remote rate limit exceeded for IP xx.xx.xx.xx TEST=repo init -q -u https://chromium.googlesource.com/chromiumos/manifest.git # Apply patch in ./.repo/repo/ # Simulate a git remote error: sed -i -e 's#chromiumos/docs#chromiumos/XXdocs#' .repo/manifests/full.xml repo sync --quiet --force-sync docs # error message now shows the remote URL Optional test tip: reduce the time.sleep(random(...)) in ./.repo/repo/project.py Change-Id: I4509383b6a43a8e66064778e8ed612d8a735c8b6
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/sync.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index bbb166c0..8e8529ee 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -324,7 +324,9 @@ later is required to fix a server side protocol bug.
324 324
325 if not success: 325 if not success:
326 err_event.set() 326 err_event.set()
327 print('error: Cannot fetch %s' % project.name, file=sys.stderr) 327 print('error: Cannot fetch %s from %s'
328 % (project.name, project.remote.url),
329 file=sys.stderr)
328 if opt.force_broken: 330 if opt.force_broken:
329 print('warn: --force-broken, continuing to sync', 331 print('warn: --force-broken, continuing to sync',
330 file=sys.stderr) 332 file=sys.stderr)