mirror of https://github.com/pypa/pip
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``,
|
||||
``hg+static-http`` and ``hg+ssh``.
|
||||
``hg+static-http``, ``hg+ssh`` and ``hg+file``.
|
||||
|
||||
Here are the supported forms::
|
||||
|
||||
|
|
|
@ -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'
|
||||
dirname = '.hg'
|
||||
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
|
||||
def get_base_rev_args(rev):
|
||||
|
|
|
@ -334,11 +334,13 @@ 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)]
|
||||
result = script.pip(*args)
|
||||
result.assert_installed('testpackage', with_files=['.hg'])
|
||||
assert path_to_url(pkg_path).startswith("file://")
|
||||
|
||||
|
||||
|
||||
@need_mercurial
|
||||
|
|
Loading…
Reference in New Issue