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

Unified Diff: gclient_scm.py

Issue 402084: gclient: Fix bug where urls with revisions are not parsed correctly. (Closed)
Patch Set: Created 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index c3c5377fd9e8f45733b56de2fbfd0ecd4d0a24d4..2b3f7aa702acf5ede91064c3f4714fa1938fe5bc 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -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)
M-A Ruel 2009/11/19 18:36:52 smells go here. :)
+ 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
« 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