depot_tools: remove code for --trybot-json

It was added in https://codereview.chromium.org/112503005
for https://bugs.chromium.org/p/chromium/issues/detail?id=278558 ,
but we ended up implementing the functionality in different way.

BUG=583578

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299433 0039d316-1c4b-4281-b951-d872f2087c98
parent ff3af2c1
......@@ -1650,6 +1650,7 @@ def main(argv=None):
parser.add_option("--rietveld_email_file", help=optparse.SUPPRESS_HELP)
parser.add_option("--rietveld_private_key_file", help=optparse.SUPPRESS_HELP)
# TODO(phajdan.jr): Update callers and remove obsolete --trybot-json .
parser.add_option("--trybot-json",
help="Output trybot information to the file specified.")
auth.add_auth_options(parser)
......@@ -1696,32 +1697,6 @@ def main(argv=None):
options.description = props['description']
logging.info('Got author: "%s"', options.author)
logging.info('Got description: """\n%s\n"""', options.description)
if options.trybot_json:
with open(options.trybot_json, 'w') as f:
# Python's sets aren't JSON-encodable, so we convert them to lists here.
class SetEncoder(json.JSONEncoder):
# pylint: disable=E0202
def default(self, obj):
if isinstance(obj, set):
return sorted(obj)
return json.JSONEncoder.default(self, obj)
change = change_class(options.name,
options.description,
options.root,
files,
options.issue,
options.patchset,
options.author,
upstream=options.upstream)
trybots = DoGetTrySlaves(
change,
change.LocalPaths(),
change.RepositoryRoot(),
None,
None,
options.verbose,
sys.stdout)
json.dump(trybots, f, cls=SetEncoder)
try:
with canned_check_filter(options.skip_canned):
results = DoPresubmitChecks(
......
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