Commit 568043bd authored by tandrii's avatar tandrii Committed by Commit bot

git cl try: remove --use-rietveld and related code.

R=nodir@chromium.org,sergiyb@chromium.org
BUG=599931

Review-Url: https://codereview.chromium.org/2401943002
parent 64103db7
...@@ -4670,10 +4670,6 @@ def CMDtry(parser, args): ...@@ -4670,10 +4670,6 @@ def CMDtry(parser, args):
# TODO(tandrii): if this even used? # TODO(tandrii): if this even used?
group.add_option( group.add_option(
'-n', '--name', help='Try job name; default to current branch name') '-n', '--name', help='Try job name; default to current branch name')
# TODO(tandrii): get rid of this.
group.add_option(
'--use-rietveld', action='store_true', default=False,
help='DEPRECATED, NOT SUPPORTED.')
group.add_option( group.add_option(
'--buildbucket-host', default='cr-buildbucket.appspot.com', '--buildbucket-host', default='cr-buildbucket.appspot.com',
help='Host of buildbucket. The default host is %default.') help='Host of buildbucket. The default host is %default.')
...@@ -4682,9 +4678,6 @@ def CMDtry(parser, args): ...@@ -4682,9 +4678,6 @@ def CMDtry(parser, args):
options, args = parser.parse_args(args) options, args = parser.parse_args(args)
auth_config = auth.extract_auth_config_from_options(options) auth_config = auth.extract_auth_config_from_options(options)
if options.use_rietveld:
parser.error('--use-rietveld is not longer supported.')
# Make sure that all properties are prop=value pairs. # Make sure that all properties are prop=value pairs.
bad_params = [x for x in options.properties if '=' not in x] bad_params = [x for x in options.properties if '=' not in x]
if bad_params: if bad_params:
...@@ -4812,35 +4805,16 @@ def CMDtry(parser, args): ...@@ -4812,35 +4805,16 @@ def CMDtry(parser, args):
'\nWARNING Mismatch between local config and server. Did a previous ' '\nWARNING Mismatch between local config and server. Did a previous '
'upload fail?\ngit-cl try always uses latest patchset from rietveld. ' 'upload fail?\ngit-cl try always uses latest patchset from rietveld. '
'Continuing using\npatchset %s.\n' % patchset) 'Continuing using\npatchset %s.\n' % patchset)
if not options.use_rietveld: try:
try: trigger_try_jobs(auth_config, cl, options, masters, 'git_cl_try')
trigger_try_jobs(auth_config, cl, options, masters, 'git_cl_try') except BuildbucketResponseException as ex:
except BuildbucketResponseException as ex: print('ERROR: %s' % ex)
print('ERROR: %s' % ex) return 1
return 1 except Exception as e:
except Exception as e: stacktrace = (''.join(traceback.format_stack()) + traceback.format_exc())
stacktrace = (''.join(traceback.format_stack()) + traceback.format_exc()) print('ERROR: Exception when trying to trigger try jobs: %s\n%s' %
print('ERROR: Exception when trying to trigger try jobs: %s\n%s' % (e, stacktrace))
(e, stacktrace)) return 1
return 1
else:
try:
cl.RpcServer().trigger_distributed_try_jobs(
cl.GetIssue(), patchset, options.name, options.clobber,
options.revision, masters)
except urllib2.HTTPError as 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:')
for (master, builders) in sorted(masters.iteritems()):
if master:
print('Master: %s' % master)
length = max(len(builder) for builder in builders)
for builder in sorted(builders):
print(' %*s: %s' % (length, builder, ','.join(builders[builder])))
return 0 return 0
......
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