Merge pull request #12306 from pradyunsg/vcs-ref

Use `-r=...` instead of `-r ...` for VCS CLI
This commit is contained in:
Stéphane Bidoul 2023-10-01 16:59:57 +02:00 committed by GitHub
commit 1082eb1262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

1
news/12306.bugfix.rst Normal file
View File

@ -0,0 +1 @@
Use ``-r=...`` instead of ``-r ...`` to specify references with Mercurial.

View File

@ -31,7 +31,7 @@ class Mercurial(VersionControl):
@staticmethod
def get_base_rev_args(rev: str) -> List[str]:
return ["-r", rev]
return [f"-r={rev}"]
def fetch_new(
self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int

View File

@ -66,7 +66,7 @@ def test_rev_options_repr() -> None:
# First check VCS-specific RevOptions behavior.
(Bazaar, [], ["-r", "123"], {}),
(Git, ["HEAD"], ["123"], {}),
(Mercurial, [], ["-r", "123"], {}),
(Mercurial, [], ["-r=123"], {}),
(Subversion, [], ["-r", "123"], {}),
# Test extra_args. For this, test using a single VersionControl class.
(