Mercurial > hg
view contrib/heptapod-ci.yml @ 45882:8cc9e7f762d6
errors: move similarity_hint() to error module
I want to be able to reuse it from `UnknownIdentifier`'s constructor.
Moving it results in a new import of `difflib` in the `error`
module. There was a comment at the top of `error.py` saying "Do not
import anything but pycompat here, please", which was added (except
for the "pycompat" bit) in 08cabecfa8a8 (errors: move revlog errors,
2009-01-11). I don't know the reason for the comment. I'm guessing the
point was to not make the module depend on other Mercurial modules. If
that was it, then importing `difflib` should be fine.
Sorry about the churn (I moved this code from the `dispatch` module to
the `scmutil` module very recently).
Differential Revision: https://phab.mercurial-scm.org/D9345
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 19 Nov 2020 12:20:26 -0800 |
parents | e604a3c03ab9 |
children | 063cf294d5e0 |
line wrap: on
line source
image: octobus/ci-mercurial-core # The runner made a clone as root. # We make a new clone owned by user used to run the step. before_script: - hg clone . /tmp/mercurial-ci/ --noupdate - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` - cd /tmp/mercurial-ci/rust/rhg - cargo build - cd /tmp/mercurial-ci/ - ls -1 tests/test-check-*.* > /tmp/check-tests.txt variables: PYTHON: python TEST_HGMODULEPOLICY: "allow" .runtests_template: &runtests script: - echo "python used, $PYTHON" - echo "$RUNTEST_ARGS" - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS checks-py2: <<: *runtests variables: RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" checks-py3: <<: *runtests variables: RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" PYTHON: python3 rust-cargo-test-py2: &rust_cargo_test script: - echo "python used, $PYTHON" - make rust-tests rust-cargo-test-py3: <<: *rust_cargo_test variables: PYTHON: python3 rust-cargo-test-py3-dirstate-tree: <<: *rust_cargo_test variables: PYTHON: python3 HG_RUST_FEATURES: dirstate-tree test-py2: <<: *runtests variables: RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" TEST_HGMODULEPOLICY: "c" test-py3: <<: *runtests variables: RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" PYTHON: python3 TEST_HGMODULEPOLICY: "c" test-py2-pure: <<: *runtests variables: RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" TEST_HGMODULEPOLICY: "py" test-py3-pure: <<: *runtests variables: RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" PYTHON: python3 TEST_HGMODULEPOLICY: "py" test-py2-rust: <<: *runtests variables: HGWITHRUSTEXT: cpython RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" TEST_HGMODULEPOLICY: "rust+c" test-py3-rust: <<: *runtests variables: HGWITHRUSTEXT: cpython RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" PYTHON: python3 TEST_HGMODULEPOLICY: "rust+c" test-py3-rust-dirstate-tree: <<: *runtests variables: HGWITHRUSTEXT: cpython RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" PYTHON: python3 TEST_HGMODULEPOLICY: "rust+c" HG_RUST_FEATURES: "dirstate-tree" test-py2-chg: <<: *runtests variables: RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" TEST_HGMODULEPOLICY: "c"