contrib/examples/fix.hgrc
author Augie Fackler <augie@google.com>
Sun, 06 Oct 2019 14:13:03 -0700
changeset 43083 7054fd370430
parent 43065 31c1a5376745
child 43092 0b75457d1133
permissions -rw-r--r--
contrib: add a fork of black (as "grey") that includes my changes This is black with https://github.com/psf/black/pull/826 applied as of today. The current git hash of black master is d9e71a75ccfefa3d9156a64c03313a0d4ad981e5, and the hash of my commit is dc1add6e94e212eff37bb3619e1422fb3c6d8dc8. In order to use this, you need to install `black` (from github master) and `typed-ast` using pip, preferably into python3, and then you can run `grey.py` with that Python and you'll have my patched version of black, which is how we've been formatting the codebase. Once my PR is merged, I'll follow up by removing this fork and updating instructions in the example config. # no-check-commit bad style Differential Revision: https://phab.mercurial-scm.org/D7002
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42965
5dfb57af1148 contrib: add new examples area and start it out with a config for `hg fix`
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
[fix]
5dfb57af1148 contrib: add new examples area and start it out with a config for `hg fix`
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
clang-format:command = clang-format --style file -i
5dfb57af1148 contrib: add new examples area and start it out with a config for `hg fix`
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
clang-format:pattern = (**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"
42966
f5ad85dd5f7e examples: add sample fix integration for `rustfmt`
Augie Fackler <augie@google.com>
parents: 42965
diff changeset
     4
f5ad85dd5f7e examples: add sample fix integration for `rustfmt`
Augie Fackler <augie@google.com>
parents: 42965
diff changeset
     5
rustfmt:command = rustfmt {rootpath}
f5ad85dd5f7e examples: add sample fix integration for `rustfmt`
Augie Fackler <augie@google.com>
parents: 42965
diff changeset
     6
rustfmt:pattern = set:**.rs
43065
31c1a5376745 examples: include a sample of how to use black with fix
Augie Fackler <augie@google.com>
parents: 42966
diff changeset
     7
43083
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
     8
# We use black, but currently with
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
     9
# https://github.com/psf/black/pull/826 applied. For now
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
    10
# contrib/grey.py is our fork of black. You need to pip install
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
    11
# git+https://github.com/python/black/@d9e71a75ccfefa3d9156a64c03313a0d4ad981e5
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
    12
# to have the dependencies for grey.
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
    13
#
7054fd370430 contrib: add a fork of black (as "grey") that includes my changes
Augie Fackler <augie@google.com>
parents: 43065
diff changeset
    14
# black:command = python3.7 contrib/grey.py --skip-string-normalization
43065
31c1a5376745 examples: include a sample of how to use black with fix
Augie Fackler <augie@google.com>
parents: 42966
diff changeset
    15
# black:pattern = set:**.py - hgext/fsmonitor/pywatchman/** - mercurial/thirdparty/** - "contrib/python-zstandard/**"