Chromium Code Reviews| Index: trychange.py |
| diff --git a/trychange.py b/trychange.py |
| index 6b0c8af646a4f56a1e4086fbf9aac6223f3ca6cf..a056bbd03c5c0bb98e174e7d6cba64e467705fb8 100755 |
| --- a/trychange.py |
| +++ b/trychange.py |
| @@ -376,14 +376,23 @@ def _GenTSBotSpec(checkouts, change, changed_files, options): |
| options.issue, |
| options.patchset, |
| options.email) |
| - trybots = presubmit_support.DoGetTryMasters( |
| + masters = presubmit_support.DoGetTryMasters( |
| change, |
| checkouts[0].GetFileNames(), |
| checkouts[0].checkout_root, |
| root_presubmit, |
| options.project, |
| options.verbose, |
| - sys.stdout).get('tryserver.chromium', []) |
| + sys.stdout) |
| + |
| + # Compatibility for old checkouts and bots that were on tryserver.chromium. |
| + trybots = 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: |
|
smut
2014/03/20 00:15:02
This is getting really hacky, and I hope this cove
Paweł Hajdan Jr.
2014/03/20 00:27:01
Yes.
|
| + trybots = masters[masters.keys()[0]] |
|
smut
2014/03/20 00:15:02
There's also "trybots = masters.values()[0]", but
Paweł Hajdan Jr.
2014/03/20 00:27:01
Oh, indeed, thanks for suggestion.
|
| + |
| if trybots: |
| old_style = filter(lambda x: isinstance(x, basestring), trybots) |
| new_style = filter(lambda x: isinstance(x, tuple), trybots) |