Commit 82549e0c authored by sbc@chromium.org's avatar sbc@chromium.org

Fix reitveld base URL for googlesource.com repos.

The base url was previously being generated as
URL@BRANCH.  I'm not sure if this works anywhere
but it certainly doesn't on googlesource.com.
Here we want URL/+/BRANCH.

R=iannucci@chromium.org, sergeyberezin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292493 0039d316-1c4b-4281-b951-d872f2087c98
parent 7b7b5b2e
......@@ -1698,9 +1698,13 @@ def RietveldUpload(options, args, cl, change):
if ': ' in line)
remote_url = keys.get('URL', None)
else:
if cl.GetRemoteUrl() and '/' in cl.GetUpstreamBranch():
remote_url = (cl.GetRemoteUrl() + '@'
+ cl.GetUpstreamBranch().split('/')[-1])
remote = cl.GetRemoteUrl()
branch = cl.GetUpstreamBranch()
if remote and branch:
if 'googlesource' in remote:
remote_url = remote + '/+/' + branch.split('/')[-1]
else:
remote_url = remote + '@' + branch.split('/')[-1]
if remote_url:
upload_args.extend(['--base_url', remote_url])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment