diff options
author | Donald Stufft <donald@stufft.io> | 2015-03-16 13:57:41 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2015-03-16 13:57:41 -0400 |
commit | fca91e1affacfdc601d062c880bc4f662bc6e82a (patch) | |
tree | bba9570544f82de197c9dd40c359beb2b6b6ad23 /pip/vcs | |
parent | e3e335d8e60ed9cd00dde7830bd8cce83703eeb4 (diff) | |
download | pip-revert-2513-ssh_and_commit_support.tar.gz |
Revert "#2414: parse SSH repositories url with a commit hash"revert-2513-ssh_and_commit_support
Diffstat (limited to 'pip/vcs')
-rw-r--r-- | pip/vcs/__init__.py | 14 | ||||
-rw-r--r-- | pip/vcs/git.py | 2 |
2 files changed, 3 insertions, 13 deletions
diff --git a/pip/vcs/__init__.py b/pip/vcs/__init__.py index b9a94669e..96cb1319f 100644 --- a/pip/vcs/__init__.py +++ b/pip/vcs/__init__.py @@ -144,17 +144,9 @@ class VersionControl(object): url = self.url.split('+', 1)[1] scheme, netloc, path, query, frag = urllib_parse.urlsplit(url) rev = None - if scheme == 'ssh' and not path: # Fix urllib_parse parsing - url_splitted = url.split('@') - if len(url_splitted) == 3: - url = '%s@%s' % (url_splitted[0], url_splitted[1]) - rev = url_splitted[2].split('#')[0] - assert len(url_splitted) < 4,\ - "You can't have more than two @ in VCS url." - else: - if '@' in path: - path, rev = path.rsplit('@', 1) - url = urllib_parse.urlunsplit((scheme, netloc, path, query, '')) + if '@' in path: + path, rev = path.rsplit('@', 1) + url = urllib_parse.urlunsplit((scheme, netloc, path, query, '')) return url, rev def get_info(self, location): diff --git a/pip/vcs/git.py b/pip/vcs/git.py index efb8b2869..d575f148a 100644 --- a/pip/vcs/git.py +++ b/pip/vcs/git.py @@ -195,8 +195,6 @@ class Git(VersionControl): url = url.replace('ssh://', '') else: url, rev = super(Git, self).get_url_rev() - # For explicit SSH URLs, remove 'ssh://' to clone - url = url.replace('ssh://', '') return url, rev |