Mercurial > hg-stable
comparison tests/test-encode @ 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 | a964ab624385 |
children | 1c4ab236ebcb |
comparison
equal
deleted
inserted
replaced
10210:43f8abcec42d | 10211:a474f950357b |
---|---|
2 | 2 |
3 hg init | 3 hg init |
4 | 4 |
5 cat > .hg/hgrc <<EOF | 5 cat > .hg/hgrc <<EOF |
6 [encode] | 6 [encode] |
7 not.gz = tr a-z A-Z | |
7 *.gz = gzip -d | 8 *.gz = gzip -d |
8 | 9 |
9 [decode] | 10 [decode] |
11 not.gz = tr A-Z a-z | |
10 *.gz = gzip | 12 *.gz = gzip |
11 | 13 |
12 EOF | 14 EOF |
13 | 15 |
14 echo "this is a test" | gzip > a.gz | 16 echo "this is a test" | gzip > a.gz |
15 hg add a.gz | 17 echo "this is a test" > not.gz |
18 hg add * | |
16 hg ci -m "test" -d "1000000 0" | 19 hg ci -m "test" -d "1000000 0" |
17 echo %% no changes | 20 echo %% no changes |
18 hg status | 21 hg status |
19 touch a.gz | 22 touch * |
20 | 23 |
21 echo %% no changes | 24 echo %% no changes |
22 hg status | 25 hg status |
23 | 26 |
24 echo %% uncompressed contents in repo | 27 echo %% check contents in repo are encoded |
25 hg debugdata .hg/store/data/a.gz.d 0 | 28 hg debugdata .hg/store/data/a.gz.d 0 |
29 hg debugdata .hg/store/data/not.gz.d 0 | |
26 | 30 |
27 echo %% uncompress our working dir copy | 31 echo %% check committed content was decoded |
28 gunzip < a.gz | 32 gunzip < a.gz |
33 cat not.gz | |
29 | 34 |
30 rm a.gz | 35 rm * |
31 hg co -C | 36 hg co -C |
32 | 37 |
33 echo %% uncompress our new working dir copy | 38 echo %% check decoding of our new working dir copy |
34 gunzip < a.gz | 39 gunzip < a.gz |
40 cat not.gz | |
35 | 41 |
36 echo %% check hg cat operation | 42 echo %% check hg cat operation |
37 hg cat a.gz | 43 hg cat a.gz |
38 hg cat --decode a.gz | gunzip | 44 hg cat --decode a.gz | gunzip |
39 mkdir subdir | 45 mkdir subdir |