Commit 1b8779ae authored by msb@chromium.org's avatar msb@chromium.org

gclient: Fix bug where urls with revisions are not parsed correctly.

Review URL: http://codereview.chromium.org/402084

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32521 0039d316-1c4b-4281-b951-d872f2087c98
parent a4d60f9b
......@@ -24,14 +24,16 @@ def CreateSCM(url=None, root_dir=None, relpath=None, scm_name='svn'):
'git' : GitWrapper,
}
if url and (url.startswith('git:') or
url.startswith('ssh:') or
url.endswith('.git')):
scm_name = 'git'
orig_url = url
if url:
url, _ = gclient_utils.SplitUrlRevision(url)
if url.startswith('git:') or url.startswith('ssh:') or url.endswith('.git'):
scm_name = 'git'
if not scm_name in scm_map:
raise gclient_utils.Error('Unsupported scm %s' % scm_name)
return scm_map[scm_name](url, root_dir, relpath, scm_name)
return scm_map[scm_name](orig_url, root_dir, relpath, scm_name)
# SCMWrapper base class
......
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