changeset 10211:a474f950357b stable

Update test and man page for multiple matching encode/decode filters
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 05 Jan 2010 03:20:45 +0100
parents 43f8abcec42d
children 3ab391dd5ec5 2bbb4c8eb27e
files doc/hgrc.5.txt tests/test-encode tests/test-encode.out
diffstat 3 files changed, 20 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hgrc.5.txt	Tue Jan 05 15:07:38 2010 -0500
+++ b/doc/hgrc.5.txt	Tue Jan 05 03:20:45 2010 +0100
@@ -202,6 +202,7 @@
 For example, to match any file ending in ``.txt`` in the root
 directory only, use the pattern ``*.txt``. To match any file ending
 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
+For each file only the first matching filter applies.
 
 The filter command can start with a specifier, either ``pipe:`` or
 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
--- a/tests/test-encode	Tue Jan 05 15:07:38 2010 -0500
+++ b/tests/test-encode	Tue Jan 05 03:20:45 2010 +0100
@@ -4,34 +4,40 @@
 
 cat > .hg/hgrc <<EOF
 [encode]
+not.gz = tr a-z A-Z
 *.gz = gzip -d
 
 [decode]
+not.gz = tr A-Z a-z
 *.gz = gzip
 
 EOF
 
 echo "this is a test" | gzip > a.gz
-hg add a.gz
+echo "this is a test" > not.gz
+hg add *
 hg ci -m "test" -d "1000000 0"
 echo %% no changes
 hg status
-touch a.gz
+touch *
 
 echo %% no changes
 hg status
 
-echo %% uncompressed contents in repo
+echo %% check contents in repo are encoded
 hg debugdata .hg/store/data/a.gz.d 0
+hg debugdata .hg/store/data/not.gz.d 0
 
-echo %% uncompress our working dir copy
+echo %% check committed content was decoded
 gunzip < a.gz
+cat not.gz
 
-rm a.gz
+rm *
 hg co -C
 
-echo %% uncompress our new working dir copy
+echo %% check decoding of our new working dir copy
 gunzip < a.gz
+cat not.gz
 
 echo %% check hg cat operation
 hg cat a.gz
--- a/tests/test-encode.out	Tue Jan 05 15:07:38 2010 -0500
+++ b/tests/test-encode.out	Tue Jan 05 03:20:45 2010 +0100
@@ -1,11 +1,14 @@
 %% no changes
 %% no changes
-%% uncompressed contents in repo
+%% check contents in repo are encoded
+this is a test
+THIS IS A TEST
+%% check committed content was decoded
 this is a test
-%% uncompress our working dir copy
 this is a test
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-%% uncompress our new working dir copy
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+%% check decoding of our new working dir copy
+this is a test
 this is a test
 %% check hg cat operation
 this is a test