Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index 4c5f9634c36a91d8c1690e00460286294aceec5d..d920bce889ba31c71fe426b9e639cc00ada42597 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -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(): |
Sam Clegg
2014/10/14 22:45:49
'/' seems to always be in the branch name even for
|
- 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] |
Sam Clegg
2014/10/14 22:45:49
Should we leave '@' as the default? I guess it ma
|
if remote_url: |
upload_args.extend(['--base_url', remote_url]) |