Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: git_cl.py

Issue 652193004: Fix reitveld base URL for googlesource.com repos. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698