Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: git_cl.py

Issue 107963005: git_cl.py: emit a more helpful message when [git try] should be used instead of [git cl try]. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index da3808a8b7f79ed9528a70a2548f99a2a6eda23a..a360cff377712e6b7f883d8f2ec450113202df9d 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2132,10 +2132,15 @@ def CMDtry(parser, args):
'\nWARNING Mismatch between local config and server. Did a previous '
'upload fail?\ngit-cl try always uses latest patchset from rietveld. '
'Continuing using\npatchset %s.\n' % patchset)
-
- cl.RpcServer().trigger_try_jobs(
- cl.GetIssue(), patchset, options.name, options.clobber, options.revision,
- builders_and_tests)
+ try:
+ cl.RpcServer().trigger_try_jobs(
+ cl.GetIssue(), patchset, options.name, options.clobber,
+ options.revision, builders_and_tests)
+ except urllib2.HTTPError, e:
+ if e.code == 404:
+ print('404 from rietveld; '
+ 'did you mean to use "git try" instead of "git cl try"?')
+ return 1
print('Tried jobs on:')
length = max(len(builder) for builder in builders_and_tests)
for builder in sorted(builders_and_tests):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698