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

Unified Diff: git_cl.py

Issue 2085013002: Add warning for non-https remotes in Gerrit git cl upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 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 ab28a9ca159f041251fbe9023363750e5363f3f4..6506f2923b7fe21d2c2a0a9de9b1b1495a0a7bb6 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2035,6 +2035,15 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
def _GetGerritHost(self):
# Lazy load of configs.
self.GetCodereviewServer()
+ if self._gerrit_host and '.' not in self._gerrit_host:
+ # Abbreviated domain like "chromium" instead of chromium.googlesource.com.
+ # This happens for internal stuff http://crbug.com/614312.
+ parsed = urlparse.urlparse(self.GetRemoteUrl())
+ if parsed.scheme == 'sso':
+ print('WARNING: using non https URLs for remote is likely broken\n'
+ ' Your current remote is: %s' % self.GetRemoteUrl())
+ self._gerrit_host = '%s.googlesource.com' % self._gerrit_host
+ self._gerrit_server = 'https://%s' % self._gerrit_host
return self._gerrit_host
def _GetGitHost(self):
« 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