Bug 1599643 - Add number of tasks to `mach try again --list` output r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D54842

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Steve Fink 2019-11-27 14:39:27 +00:00
Родитель 76ebf2a735
Коммит 3cba3308a0
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -91,7 +91,12 @@ def run(index=0, purge=False, list_configs=False, list_tasks=0, message='{msg}',
if list_configs or list_tasks > 0:
for i, data in enumerate(history):
msg, config = json.loads(data)
print('{}. {}'.format(i, msg))
n = len(config['tasks'])
print('{index}. ({n} task{s}) {msg}'.format(
index=i,
msg=msg,
n=n,
s='' if n == 1 else 's'))
if list_tasks > 0:
indent = ' ' * 4