From e4f0fe02a97d526b565fc13152436f6f165e05c6 Mon Sep 17 00:00:00 2001 From: nodir Date: Fri, 4 Nov 2016 16:23:30 -0700 Subject: [PATCH] fix git-cl-try without parameters Master names were confused with bucket names R=tandrii@chromium.org, qyearsley@chromium.org BUG=661580 Review-Url: https://codereview.chromium.org/2482523002 --- git_cl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 66bb76831..983374713 100755 --- a/git_cl.py +++ b/git_cl.py @@ -350,7 +350,7 @@ def _get_bucket_map(changelist, options, option_parser): change = changelist.GetChange( changelist.GetCommonAncestorWithUpstream(), None) # Get try masters from PRESUBMIT.py files. - return presubmit_support.DoGetTryMasters( + masters = presubmit_support.DoGetTryMasters( change=change, changed_files=change.LocalPaths(), repository_root=settings.GetRoot(), @@ -358,6 +358,9 @@ def _get_bucket_map(changelist, options, option_parser): project=None, verbose=options.verbose, output_stream=sys.stdout) + if masters is None: + return None + return {MASTER_PREFIX + m: b for m, b in masters.iteritems()} if options.bucket: return {options.bucket: {b: [] for b in options.bot}}