Commit d246c972 authored by fischman@chromium.org's avatar fischman@chromium.org

git_cl.py: emit a more helpful message when [git try] should be used instead of [git cl try].

BUG=330321

Review URL: https://codereview.chromium.org/107963005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@242301 0039d316-1c4b-4281-b951-d872f2087c98
parent c3d17dd5
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment