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
|
||||
~~~~~~~~~
|
||||
|
||||
The supported schemes are: ``hg+http``, ``hg+https``,
|
||||
``hg+static-http`` and ``hg+ssh``.
|
||||
The supported schemes are: ``hg+file``, ``hg+http``, ``hg+https``,
|
||||
``hg+static-http``, and ``hg+ssh``.
|
||||
|
||||
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'
|
||||
dirname = '.hg'
|
||||
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
|
||||
def get_base_rev_args(rev):
|
||||
|
|
|
@ -334,9 +334,11 @@ def test_install_editable_uninstalls_existing_from_path(script, data):
|
|||
|
||||
@need_mercurial
|
||||
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')
|
||||
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.assert_installed('testpackage', with_files=['.hg'])
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ class TestLink:
|
|||
@pytest.mark.parametrize('url, expected', [
|
||||
('git+https://github.com/org/repo', True),
|
||||
('bzr+http://bzr.myproject.org/MyProject/trunk/#egg=MyProject', True),
|
||||
('hg+file://hg.company.com/repo', True),
|
||||
('https://example.com/some.whl', False),
|
||||
('file://home/foo/some.whl', False),
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue