Show More
@@ -1,48 +1,61 b'' | |||||
1 | #!/bin/sh |
|
1 | Test encode/decode filters | |
2 |
|
||||
3 | hg init |
|
|||
4 |
|
||||
5 | cat > .hg/hgrc <<EOF |
|
|||
6 | [encode] |
|
|||
7 | not.gz = tr [:lower:] [:upper:] |
|
|||
8 | *.gz = gzip -d |
|
|||
9 |
|
2 | |||
10 | [decode] |
|
3 | $ hg init | |
11 | not.gz = tr [:upper:] [:lower:] |
|
4 | $ cat > .hg/hgrc <<EOF | |
12 | *.gz = gzip |
|
5 | > [encode] | |
13 |
|
6 | > not.gz = tr [:lower:] [:upper:] | ||
14 | EOF |
|
7 | > *.gz = gzip -d | |
|
8 | > [decode] | |||
|
9 | > not.gz = tr [:upper:] [:lower:] | |||
|
10 | > *.gz = gzip | |||
|
11 | > EOF | |||
|
12 | $ echo "this is a test" | gzip > a.gz | |||
|
13 | $ echo "this is a test" > not.gz | |||
|
14 | $ hg add * | |||
|
15 | $ hg ci -m "test" | |||
15 |
|
16 | |||
16 | echo "this is a test" | gzip > a.gz |
|
17 | no changes | |
17 | echo "this is a test" > not.gz |
|
18 | ||
18 | hg add * |
|
19 | $ hg status | |
19 | hg ci -m "test" |
|
20 | $ touch * | |
20 | echo %% no changes |
|
21 | ||
21 | hg status |
|
22 | no changes | |
22 | touch * |
|
23 | ||
|
24 | $ hg status | |||
|
25 | ||||
|
26 | check contents in repo are encoded | |||
23 |
|
27 | |||
24 | echo %% no changes |
|
28 | $ hg debugdata .hg/store/data/a.gz.d 0 | |
25 | hg status |
|
29 | this is a test | |
|
30 | $ hg debugdata .hg/store/data/not.gz.d 0 | |||
|
31 | THIS IS A TEST | |||
|
32 | ||||
|
33 | check committed content was decoded | |||
26 |
|
34 | |||
27 | echo %% check contents in repo are encoded |
|
35 | $ gunzip < a.gz | |
28 | hg debugdata .hg/store/data/a.gz.d 0 |
|
36 | this is a test | |
29 | hg debugdata .hg/store/data/not.gz.d 0 |
|
37 | $ cat not.gz | |
|
38 | this is a test | |||
|
39 | $ rm * | |||
|
40 | $ hg co -C | |||
|
41 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
30 |
|
42 | |||
31 | echo %% check committed content was decoded |
|
43 | check decoding of our new working dir copy | |
32 | gunzip < a.gz |
|
|||
33 | cat not.gz |
|
|||
34 |
|
44 | |||
35 | rm * |
|
45 | $ gunzip < a.gz | |
36 | hg co -C |
|
46 | this is a test | |
|
47 | $ cat not.gz | |||
|
48 | this is a test | |||
37 |
|
49 | |||
38 | echo %% check decoding of our new working dir copy |
|
50 | check hg cat operation | |
39 | gunzip < a.gz |
|
|||
40 | cat not.gz |
|
|||
41 |
|
51 | |||
42 | echo %% check hg cat operation |
|
52 | $ hg cat a.gz | |
43 | hg cat a.gz |
|
53 | this is a test | |
44 | hg cat --decode a.gz | gunzip |
|
54 | $ hg cat --decode a.gz | gunzip | |
45 | mkdir subdir |
|
55 | this is a test | |
46 |
|
|
56 | $ mkdir subdir | |
47 | hg -R .. cat ../a.gz |
|
57 | $ cd subdir | |
48 |
hg -R .. cat |
|
58 | $ hg -R .. cat ../a.gz | |
|
59 | this is a test | |||
|
60 | $ hg -R .. cat --decode ../a.gz | gunzip | |||
|
61 | this is a test |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now