mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Fix hg: "parse error at 0: not a prefix:" (#12373)
Use two hypen argument `--rev=` instead of `-r=` Co-authored-by: Efflam Lemaillet <elemaillet@logilab.fr> Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
This commit is contained in:
parent
7aaca9f2c4
commit
6dbd9c68f0
1
news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst
Normal file
1
news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix mercurial revision "parse error": use ``--rev={ref}`` instead of ``-r={ref}``
|
|
@ -31,7 +31,7 @@ class Mercurial(VersionControl):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_base_rev_args(rev: str) -> List[str]:
|
def get_base_rev_args(rev: str) -> List[str]:
|
||||||
return [f"-r={rev}"]
|
return [f"--rev={rev}"]
|
||||||
|
|
||||||
def fetch_new(
|
def fetch_new(
|
||||||
self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
|
self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int
|
||||||
|
|
|
@ -66,7 +66,7 @@ def test_rev_options_repr() -> None:
|
||||||
# First check VCS-specific RevOptions behavior.
|
# First check VCS-specific RevOptions behavior.
|
||||||
(Bazaar, [], ["-r", "123"], {}),
|
(Bazaar, [], ["-r", "123"], {}),
|
||||||
(Git, ["HEAD"], ["123"], {}),
|
(Git, ["HEAD"], ["123"], {}),
|
||||||
(Mercurial, [], ["-r=123"], {}),
|
(Mercurial, [], ["--rev=123"], {}),
|
||||||
(Subversion, [], ["-r", "123"], {}),
|
(Subversion, [], ["-r", "123"], {}),
|
||||||
# Test extra_args. For this, test using a single VersionControl class.
|
# Test extra_args. For this, test using a single VersionControl class.
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in a new issue