contrib/examples/fix.hgrc
author Augie Fackler <augie@google.com>
Mon, 14 Oct 2019 12:46:32 -0400
changeset 43222 8f89899a5446
parent 43093 9002f4a3dde6
child 43223 15c05732d177
permissions -rw-r--r--
black: rename pyproject.toml to black.toml Black won't read this automatically (you'll have to specify --config), but having a pyproject.toml *at all* puts pip in PEP 517/518 mode which breaks us for obscure reasons I don't understand. Rather than waste a ton of time fighting with pip, let's just do this. Differential Revision: https://phab.mercurial-scm.org/D7087

[fix]
clang-format:command = clang-format --style file -i
clang-format:pattern = (**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"

rustfmt:command = rustfmt {rootpath}
rustfmt:pattern = set:**.rs

# We use black, but currently with
# https://github.com/psf/black/pull/826 applied. For now
# contrib/grey.py is our fork of black. You need to pip install
# git+https://github.com/python/black/@d9e71a75ccfefa3d9156a64c03313a0d4ad981e5
# to have the dependencies for grey.
#
# black:command = python3.7 contrib/grey.py --quiet --config=black.toml --skip-string-normalization -
# black:pattern = set:**.py - hgext/fsmonitor/pywatchman/** - mercurial/thirdparty/** - "contrib/python-zstandard/**"