Commit eab3c043 authored by qyearsley's avatar qyearsley Committed by Commit bot

Change "tryjob" -> "try job" in git_cl.py and trychange.py.

I know this is an unimportant change, and that across Chromium,
"try job" and "tryjob", and "try bot" and "trybot" are basically
interchangeable, still I think it's nice to have the spelling
consistent within one module.

I prefer the version with a space just because that's what's used
in the documentation:
https://www.chromium.org/developers/testing/try-server-usage

Review-Url: https://codereview.chromium.org/2269283002
parent b9f5e379
......@@ -383,7 +383,7 @@ def trigger_try_jobs(auth_config, changelist, options, masters, category):
)
_buildbucket_retry(
'triggering tryjobs',
'triggering try jobs',
http,
buildbucket_put_url,
'PUT',
......@@ -396,7 +396,7 @@ def trigger_try_jobs(auth_config, changelist, options, masters, category):
def fetch_try_jobs(auth_config, changelist, options):
"""Fetches tryjobs from buildbucket.
"""Fetches try jobs from buildbucket.
Returns a map from build id to build info as json dictionary.
"""
......@@ -424,7 +424,7 @@ def fetch_try_jobs(auth_config, changelist, options):
url = 'https://{hostname}/_ah/api/buildbucket/v1/search?{params}'.format(
hostname=options.buildbucket_host,
params=urllib.urlencode(params))
content = _buildbucket_retry('fetching tryjobs', http, url, 'GET')
content = _buildbucket_retry('fetching try jobs', http, url, 'GET')
for build in content.get('builds', []):
builds[build['id']] = build
if 'next_cursor' in content:
......@@ -434,10 +434,10 @@ def fetch_try_jobs(auth_config, changelist, options):
return builds
def print_tryjobs(options, builds):
def print_try_jobs(options, builds):
"""Prints nicely result of fetch_try_jobs."""
if not builds:
print('No tryjobs scheduled')
print('No try jobs scheduled')
return
# Make a copy, because we'll be modifying builds dictionary.
......@@ -530,7 +530,7 @@ def print_tryjobs(options, builds):
pop(title='Other:',
f=lambda b: (get_name(b), 'id=%s' % b['id']))
assert len(builds) == 0
print('Total: %d tryjobs' % total)
print('Total: %d try jobs' % total)
def MatchSvnGlob(url, base_url, glob_spec, allow_wildcards):
......@@ -4608,10 +4608,10 @@ def CMDtry(parser, args):
props = cl.GetIssueProperties()
if props.get('closed'):
parser.error('Cannot send tryjobs for a closed CL')
parser.error('Cannot send try jobs for a closed CL')
if props.get('private'):
parser.error('Cannot use trybots with private issue')
parser.error('Cannot use try bots with private issue')
if not options.name:
options.name = cl.GetBranch()
......@@ -4721,7 +4721,7 @@ def CMDtry(parser, args):
return 1
except Exception as e:
stacktrace = (''.join(traceback.format_stack()) + traceback.format_exc())
print('ERROR: Exception when trying to trigger tryjobs: %s\n%s' %
print('ERROR: Exception when trying to trigger try jobs: %s\n%s' %
(e, stacktrace))
return 1
else:
......@@ -4782,10 +4782,10 @@ def CMDtry_results(parser, args):
return 1
except Exception as e:
stacktrace = (''.join(traceback.format_stack()) + traceback.format_exc())
print('ERROR: Exception when trying to fetch tryjobs: %s\n%s' %
print('ERROR: Exception when trying to fetch try jobs: %s\n%s' %
(e, stacktrace))
return 1
print_tryjobs(options, jobs)
print_try_jobs(options, jobs)
return 0
......
......@@ -398,16 +398,16 @@ def _GenTSBotSpec(checkouts, change, changed_files, options):
sys.stdout)
# Compatibility for old checkouts and bots that were on tryserver.chromium.
trybots = masters.get('tryserver.chromium', [])
try_bots = masters.get('tryserver.chromium', [])
# Compatibility for checkouts that are not using tryserver.chromium
# but are stuck with git-try or gcl-try.
if not trybots and len(masters) == 1:
trybots = masters.values()[0]
if not try_bots and len(masters) == 1:
try_bots = masters.values()[0]
if trybots:
old_style = filter(lambda x: isinstance(x, basestring), trybots)
new_style = filter(lambda x: isinstance(x, tuple), trybots)
if try_bots:
old_style = filter(lambda x: isinstance(x, basestring), try_bots)
new_style = filter(lambda x: isinstance(x, tuple), try_bots)
# _ParseBotList's testfilter is set to None otherwise it will complain.
bot_spec = _ApplyTestFilter(options.testfilter,
......@@ -722,7 +722,7 @@ def _SendChangeGerrit(bot_spec, options):
that local revision matches the uploaded one, posts a try job in form of a
message, sets Tryjob-Request label to 1.
Gerrit message format: starts with !tryjob, optionally followed by a tryjob
Gerrit message format: starts with !tryjob, optionally followed by a try job
definition in JSON format:
buildNames: list of strings specifying build names.
build_properties: a dict of build properties.
......@@ -802,7 +802,7 @@ def _SendChangeGerrit(bot_spec, options):
PostTryjob(message)
change_url = urlparse.urljoin(options.gerrit_url,
'/#/c/%s' % changes[0]['_number'])
print('A tryjob was posted on change %s' % change_url)
print('A try job was posted on change %s' % change_url)
def PrintSuccess(bot_spec, options):
if not options.dry_run:
......@@ -1026,7 +1026,7 @@ def gen_parser(prog):
help="Use Gerrit to talk to the try server")
group.add_option("--gerrit_url",
metavar="GERRIT_URL",
help="Gerrit url to post a tryjob to; --use_gerrit is "
help="Gerrit url to post a try job to; --use_gerrit is "
"implied when using --gerrit_url")
parser.add_option_group(group)
......
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