mirror of https://github.com/pypa/pip
Merge pull request #7065 from chrahunt/pr-5955
Explicit support for hg+file
This commit is contained in:
commit
5a997b7509
|
@ -417,8 +417,8 @@ making fewer network calls).
|
||||||
Mercurial
|
Mercurial
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
The supported schemes are: ``hg+http``, ``hg+https``,
|
The supported schemes are: ``hg+file``, ``hg+http``, ``hg+https``,
|
||||||
``hg+static-http`` and ``hg+ssh``.
|
``hg+static-http``, and ``hg+ssh``.
|
||||||
|
|
||||||
Here are the supported forms::
|
Here are the supported forms::
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Correct inconsistency related to the `hg+file` scheme.
|
|
@ -27,7 +27,9 @@ class Mercurial(VersionControl):
|
||||||
name = 'hg'
|
name = 'hg'
|
||||||
dirname = '.hg'
|
dirname = '.hg'
|
||||||
repo_name = 'clone'
|
repo_name = 'clone'
|
||||||
schemes = ('hg', 'hg+http', 'hg+https', 'hg+ssh', 'hg+static-http')
|
schemes = (
|
||||||
|
'hg', 'hg+file', 'hg+http', 'hg+https', 'hg+ssh', 'hg+static-http',
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_base_rev_args(rev):
|
def get_base_rev_args(rev):
|
||||||
|
|
|
@ -334,9 +334,11 @@ def test_install_editable_uninstalls_existing_from_path(script, data):
|
||||||
|
|
||||||
@need_mercurial
|
@need_mercurial
|
||||||
def test_basic_install_editable_from_hg(script, tmpdir):
|
def test_basic_install_editable_from_hg(script, tmpdir):
|
||||||
"""Test cloning from Mercurial."""
|
"""Test cloning and hg+file install from Mercurial."""
|
||||||
pkg_path = _create_test_package(script, name='testpackage', vcs='hg')
|
pkg_path = _create_test_package(script, name='testpackage', vcs='hg')
|
||||||
args = ['install', '-e', 'hg+%s#egg=testpackage' % path_to_url(pkg_path)]
|
url = 'hg+{}#egg=testpackage'.format(path_to_url(pkg_path))
|
||||||
|
assert url.startswith('hg+file')
|
||||||
|
args = ['install', '-e', url]
|
||||||
result = script.pip(*args)
|
result = script.pip(*args)
|
||||||
result.assert_installed('testpackage', with_files=['.hg'])
|
result.assert_installed('testpackage', with_files=['.hg'])
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,7 @@ class TestLink:
|
||||||
@pytest.mark.parametrize('url, expected', [
|
@pytest.mark.parametrize('url, expected', [
|
||||||
('git+https://github.com/org/repo', True),
|
('git+https://github.com/org/repo', True),
|
||||||
('bzr+http://bzr.myproject.org/MyProject/trunk/#egg=MyProject', True),
|
('bzr+http://bzr.myproject.org/MyProject/trunk/#egg=MyProject', True),
|
||||||
|
('hg+file://hg.company.com/repo', True),
|
||||||
('https://example.com/some.whl', False),
|
('https://example.com/some.whl', False),
|
||||||
('file://home/foo/some.whl', False),
|
('file://home/foo/some.whl', False),
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue