| Index: git_cl.py
|
| diff --git a/git_cl.py b/git_cl.py
|
| index 8cc37bf589eba07923e273d6578a3d7e0f8597f3..3b3db6dec97754be05eb158b3232e0119a2d3422 100755
|
| --- a/git_cl.py
|
| +++ b/git_cl.py
|
| @@ -318,7 +318,7 @@ def trigger_try_jobs(auth_config, changelist, options, masters, category,
|
| time.sleep(0.5 + 1.5*try_count)
|
|
|
| print '\n'.join(print_text)
|
| -
|
| +
|
|
|
| def MatchSvnGlob(url, base_url, glob_spec, allow_wildcards):
|
| """Return the corresponding git ref if |base_url| together with |glob_spec|
|
| @@ -2071,6 +2071,30 @@ def RietveldUpload(options, args, cl, change):
|
| if target_ref:
|
| upload_args.extend(['--target_ref', target_ref])
|
|
|
| + # Look for dependent patchsets. See crbug/480453 for more details.
|
| + remote, upstream_branch = cl.FetchUpstreamTuple(cl.GetBranch())
|
| + upstream_branch = ShortBranchName(upstream_branch)
|
| + if remote is '.':
|
| + # A local branch is being tracked.
|
| + local_branch = ShortBranchName(upstream_branch)
|
| + auth_config = auth.extract_auth_config_from_options(options)
|
| + branch_cl = Changelist(branchref=local_branch, auth_config=auth_config)
|
| + branch_cl_issue_url = branch_cl.GetIssueURL()
|
| + branch_cl_status = branch_cl.GetStatus()
|
| + # Check if the local branch's CL should be marked as a dependency.
|
| + if branch_cl_status in ('unsent', 'waiting', 'reply', 'lgtm'):
|
| + branch_cl_issue = branch_cl.GetIssue()
|
| + branch_cl_patchset = branch_cl.GetPatchset()
|
| + upload_args.extend(
|
| + ['--depends_on_patchset', '%s:%s' % (
|
| + branch_cl_issue, branch_cl_patchset)])
|
| + print
|
| + print ('The current branch (%s) is tracking a local branch (%s) with '
|
| + 'an open CL.') % (cl.GetBranch(), local_branch)
|
| + print 'Adding %s/#ps%s as a dependency patchset.' % (
|
| + branch_cl_issue_url, branch_cl_patchset)
|
| + print
|
| +
|
| project = settings.GetProject()
|
| if project:
|
| upload_args.extend(['--project', project])
|
|
|