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