Add pending prefix to the target_ref if it is specified

BUG=435702

Review URL: https://codereview.chromium.org/797793003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293356 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
rmistry@google.com 10 years ago
parent 9f1f040b5f
commit 2138f50f8f

@ -1761,6 +1761,10 @@ def RietveldUpload(options, args, cl, change):
'refs/heads/')
elif remote_branch.startswith('refs/remotes/branch-heads'):
remote_branch = remote_branch.replace('refs/remotes/', 'refs/')
pending_prefix = settings.GetPendingRefPrefix()
# If a pending prefix exists then replace refs/ with it.
if pending_prefix:
remote_branch = remote_branch.replace('refs/', pending_prefix)
upload_args.extend(['--target_ref', remote_branch])
project = settings.GetProject()

Loading…
Cancel
Save