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

Unified Diff: gclient_scm.py

Issue 8590024: Introduced git+http(s) fake URL schema to support git urls which don't have "filename.git" portio... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 9 years, 1 month 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 | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
===================================================================
--- gclient_scm.py (revision 110386)
+++ gclient_scm.py (working copy)
@@ -67,6 +67,7 @@
if url:
url, _ = gclient_utils.SplitUrlRevision(url)
if (url.startswith('git://') or url.startswith('ssh://') or
+ url.startswith('git+http://') or url.startswith('git+https://') or
url.endswith('.git')):
return 'git'
elif (url.startswith('http://') or url.startswith('https://') or
@@ -126,6 +127,12 @@
class GitWrapper(SCMWrapper):
"""Wrapper for Git"""
+ def __init__(self, url=None, root_dir=None, relpath=None):
+ """Removes 'git+' fake prefix from git URL."""
+ if url.startswith('git+http://') or url.startswith('git+https://'):
+ url = url[4:]
+ SCMWrapper.__init__(self, url, root_dir, relpath)
+
def GetRevisionDate(self, revision):
"""Returns the given revision's date in ISO-8601 format (which contains the
time zone)."""
« no previous file with comments | « no previous file | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698