[PATCH 3 of 4] document '!' and 'exact:' encoders/decoders
Mark Hammond
mhammond at skippinet.com.au
Sat Apr 18 01:44:54 UTC 2009
# HG changeset patch
# User Mark Hammond <mhammond at skippinet.com.au>
# Date 1240017740 -36000
# Node ID 6fa400a25915cbd5f5d8de0edc0dc46b0093873b
# Parent 5d89dd261ff9eb5967aa7ecc576b1323d94a1b1b
document '!' and 'exact:' encoders/decoders
diff --git a/doc/hgrc.5.txt b/doc/hgrc.5.txt
--- a/doc/hgrc.5.txt
+++ b/doc/hgrc.5.txt
@@ -107,6 +107,10 @@
localization/canonicalization of files.
Filters consist of a filter pattern followed by a filter command.
+ Filter patterns are tested in the order of the pattern length (eg,
+ 'foo/*' is tested before '**') and filtering is stopped after the
+ first match (ie, only one filter will ever be applied to a file)
+
Filter patterns are globs by default, rooted at the repository
root. For example, to match any file ending in ".txt" in the root
directory only, use the pattern "*.txt". To match any file ending
@@ -159,6 +163,39 @@
[decode]
**.txt = dumbdecode:
+ The filter command "!" disables all previous filter definitions for that
+ pattern. The pattern indicated may still be subject to filtering if it
+ matches other patterns. If you want to disable filtering completely for a
+ file or pattern, add your filter using the 'exact' filters.
+
+ To explain the differences, consider the following examples:
+
+ ## User's Mercurial.ini ##
+ [encode]
+ **.foo = dumbencode:
+ ** = cleverencode:
+
+ ## Tree's .hg/hgrc file ##
+ [encode]
+ **.foo = !
+
+ In the example above, '*.foo' files will have cleverencoding applied; the
+ entry in the .hgrc file has the effect of disabling the **.foo pattern in
+ Mercurual.ini, so '*.foo' files then match the '**' pattern. However,
+ consider the following configuration:
+
+ ## User's Mercurial.ini ##
+ [encode]
+ **.foo = dumbencode:
+ ** = cleverencode:
+
+ ## Tree's .hg/hgrc file ##
+ [encode]
+ **.foo = exact:
+
+ In this example, '*.foo' files will have the 'exact' encoding applied,
+ meaning the contents of the file are not touched by the encoding process.
+
[[defaults]]
defaults::
Use the [defaults] section to define command defaults, i.e. the
More information about the Mercurial-devel
mailing list