mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Explicit support and tests for hg+file
scheme for pip install
.
This commit is contained in:
parent
dd62731107
commit
3f98ee4250
|
@ -418,7 +418,7 @@ Mercurial
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
The supported schemes are: ``hg+http``, ``hg+https``,
|
The supported schemes are: ``hg+http``, ``hg+https``,
|
||||||
``hg+static-http`` and ``hg+ssh``.
|
``hg+static-http``, ``hg+ssh`` and ``hg+file``.
|
||||||
|
|
||||||
Here are the supported forms::
|
Here are the supported forms::
|
||||||
|
|
||||||
|
|
2
news/4358.bugfix
Normal file
2
news/4358.bugfix
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Not a feature because the ``hg+file`` scheme was already functioning implicitly but inconsistently documented.
|
||||||
|
This change is to make the scheme support explicit, including tests and docs.
|
|
@ -22,7 +22,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+http', 'hg+https', 'hg+ssh', 'hg+static-http', 'hg+file'
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_base_rev_args(rev):
|
def get_base_rev_args(rev):
|
||||||
|
|
|
@ -334,11 +334,13 @@ 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)]
|
args = ['install', '-e', 'hg+%s#egg=testpackage' % path_to_url(pkg_path)]
|
||||||
result = script.pip(*args)
|
result = script.pip(*args)
|
||||||
result.assert_installed('testpackage', with_files=['.hg'])
|
result.assert_installed('testpackage', with_files=['.hg'])
|
||||||
|
assert path_to_url(pkg_path).startswith("file://")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@need_mercurial
|
@need_mercurial
|
||||||
|
|
Loading…
Reference in a new issue