Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: trychange.py

Issue 205633003: Fix compatibility for gcl-try/git-try with repos not using tryserver.chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: simpler Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trychange.py
diff --git a/trychange.py b/trychange.py
index 6b0c8af646a4f56a1e4086fbf9aac6223f3ca6cf..f93d9a418778fd11c5cc52ac660952941ac88297 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:
+ trybots = masters.values()[0]
+
if trybots:
old_style = filter(lambda x: isinstance(x, basestring), trybots)
new_style = filter(lambda x: isinstance(x, tuple), trybots)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698