D7617: fix: make example fix hgrc work in subdirs

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Thu Dec 12 17:42:55 EST 2019


spectral created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Filesets are relative to the current working directory by default, so we use
  rootglob: to change this behavior.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  contrib/examples/fix.hgrc

CHANGE DETAILS

diff --git a/contrib/examples/fix.hgrc b/contrib/examples/fix.hgrc
--- a/contrib/examples/fix.hgrc
+++ b/contrib/examples/fix.hgrc
@@ -1,9 +1,8 @@
 [fix]
-clang-format:command = clang-format --style file -i
-clang-format:pattern = (**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"
+clang-format:pattern = (rootglob:**.c or rootglob:**.cc or rootglob:**.h) and not "listfile:contrib/clang-format-ignorelist"
 
 rustfmt:command = rustfmt
-rustfmt:pattern = set:**.rs
+rustfmt:pattern = set:rootglob:**.rs
 
 black:command = black --config=black.toml -
-black:pattern = set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"
+black:pattern = set:rootglob:**.py - rootglob:mercurial/thirdparty/** - "rootglob:contrib/python-zstandard/**"



To: spectral, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list