mirror of https://github.com/pypa/pip
Remove vestigial `VersionControl.get_info()` method.
This commit is contained in:
parent
15e6b7c8b3
commit
814b4bd52a
|
@ -250,14 +250,6 @@ class VersionControl(object):
|
|||
|
||||
return url, rev_options
|
||||
|
||||
def get_info(self, location):
|
||||
"""
|
||||
Returns (url, revision), where both are strings
|
||||
"""
|
||||
assert not location.rstrip('/').endswith(self.dirname), \
|
||||
'Bad directory: %s' % location
|
||||
return self.get_url(location), self.get_revision(location)
|
||||
|
||||
def normalize_url(self, url):
|
||||
"""
|
||||
Normalize a URL for comparison by unquoting it and removing any
|
||||
|
@ -422,7 +414,7 @@ class VersionControl(object):
|
|||
"""
|
||||
Return the url used at location
|
||||
|
||||
This is used in get_info() and obtain().
|
||||
This is used in obtain().
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
|
|
@ -31,34 +31,6 @@ class Subversion(VersionControl):
|
|||
def get_base_rev_args(self, rev):
|
||||
return ['-r', rev]
|
||||
|
||||
def get_info(self, location):
|
||||
"""Returns (url, revision), where both are strings"""
|
||||
assert not location.rstrip('/').endswith(self.dirname), \
|
||||
'Bad directory: %s' % location
|
||||
output = self.run_command(
|
||||
['info', location],
|
||||
show_stdout=False,
|
||||
extra_environ={'LANG': 'C'},
|
||||
)
|
||||
match = _svn_url_re.search(output)
|
||||
if not match:
|
||||
logger.warning(
|
||||
'Cannot determine URL of svn checkout %s',
|
||||
display_path(location),
|
||||
)
|
||||
logger.debug('Output that cannot be parsed: \n%s', output)
|
||||
return None, None
|
||||
url = match.group(1).strip()
|
||||
match = _svn_revision_re.search(output)
|
||||
if not match:
|
||||
logger.warning(
|
||||
'Cannot determine revision of svn checkout %s',
|
||||
display_path(location),
|
||||
)
|
||||
logger.debug('Output that cannot be parsed: \n%s', output)
|
||||
return url, None
|
||||
return url, match.group(1)
|
||||
|
||||
def export(self, location):
|
||||
"""Export the svn repository at the url to the destination location"""
|
||||
url, rev_options = self.get_url_rev_options(self.url)
|
||||
|
|
Loading…
Reference in New Issue