Patchwork D12180: hghave: update rustfmt criterion

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2022, 6:14 p.m.
Message ID <differential-rev-PHID-DREV-rqtpmlgqp3rydnbij6ck-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50515/
State New
Headers show

Comments

phabricator - Feb. 14, 2022, 6:14 p.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In 9ebc10ad4a04 <https://phab.mercurial-scm.org/rHG9ebc10ad4a0483c182511ec23cd236e169c74770> I updated `rustfmt` without touching hghave, which means
  that the CI has been skipping the format test ever since. Thankfully, only
  one offending line exists in the code that's been introduced since.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D12180

AFFECTED FILES
  tests/hghave.py
  tests/test-check-rust-format.t

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-check-rust-format.t b/tests/test-check-rust-format.t
--- a/tests/test-check-rust-format.t
+++ b/tests/test-check-rust-format.t
@@ -3,6 +3,8 @@ 
   $ . "$TESTDIR/helpers-testrepo.sh"
 
   $ cd "$TESTDIR"/..
+
+Warning: Keep this in sync with hghave.py
   $ RUSTFMT=$(rustup which --toolchain nightly-2021-11-02 rustfmt)
   $ for f in `testrepohg files 'glob:**/*.rs'` ; do
   >   $RUSTFMT --check --edition=2018 --unstable-features --color=never $f
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -1121,11 +1121,11 @@ 
     return version and sv(_bytes2sys(version.group(0))) >= sv('2019.10.17')
 
 
-@check("rustfmt", "rustfmt tool at version nightly-2020-10-04")
+@check("rustfmt", "rustfmt tool at version nightly-2021-11-02")
 def has_rustfmt():
     # We use Nightly's rustfmt due to current unstable config options.
     return matchoutput(
-        '`rustup which --toolchain nightly-2020-10-04 rustfmt` --version',
+        '`rustup which --toolchain nightly-2021-11-02 rustfmt` --version',
         b'rustfmt',
     )