Mercurial > hg
annotate tests/test-encode @ 10592:1875dc1ac5f4 stable
Added tag 1.5 for changeset ff2704a8ded3
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 05 Mar 2010 18:26:12 -0600 |
parents | 1c4ab236ebcb |
children | 4c94b6d0fb1c |
rev | line source |
---|---|
1258 | 1 #!/bin/sh |
2 | |
3 hg init | |
4 | |
5 cat > .hg/hgrc <<EOF | |
6 [encode] | |
10279
1c4ab236ebcb
test-encode: Use tr chacter classes instead of character ranges
Mads Kiilerich <mads@kiilerich.com>
parents:
10211
diff
changeset
|
7 not.gz = tr [:lower:] [:upper:] |
7080
a6477aa893b8
tests: Windows compatibility fixes
Patrick Mezard <pmezard@gmail.com>
parents:
6094
diff
changeset
|
8 *.gz = gzip -d |
1258 | 9 |
10 [decode] | |
10279
1c4ab236ebcb
test-encode: Use tr chacter classes instead of character ranges
Mads Kiilerich <mads@kiilerich.com>
parents:
10211
diff
changeset
|
11 not.gz = tr [:upper:] [:lower:] |
1258 | 12 *.gz = gzip |
13 | |
14 EOF | |
15 | |
16 echo "this is a test" | gzip > a.gz | |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
17 echo "this is a test" > not.gz |
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
18 hg add * |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1258
diff
changeset
|
19 hg ci -m "test" -d "1000000 0" |
1258 | 20 echo %% no changes |
21 hg status | |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
22 touch * |
1258 | 23 |
24 echo %% no changes | |
25 hg status | |
26 | |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
27 echo %% check contents in repo are encoded |
3853
c0b449154a90
switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1933
diff
changeset
|
28 hg debugdata .hg/store/data/a.gz.d 0 |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
29 hg debugdata .hg/store/data/not.gz.d 0 |
1258 | 30 |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
31 echo %% check committed content was decoded |
1258 | 32 gunzip < a.gz |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
33 cat not.gz |
1258 | 34 |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
35 rm * |
8742
a964ab624385
merge: allow merging going backwards
Matt Mackall <mpm@selenic.com>
parents:
7080
diff
changeset
|
36 hg co -C |
1258 | 37 |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
38 echo %% check decoding of our new working dir copy |
1258 | 39 gunzip < a.gz |
10211
a474f950357b
Update test and man page for multiple matching encode/decode filters
Mads Kiilerich <mads@kiilerich.com>
parents:
8742
diff
changeset
|
40 cat not.gz |
6093
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
41 |
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
42 echo %% check hg cat operation |
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
43 hg cat a.gz |
6094
3998c1b0828f
cat --decode: Drop short option, use opts.get() instead of opts[]
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6093
diff
changeset
|
44 hg cat --decode a.gz | gunzip |
6093
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
45 mkdir subdir |
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
46 cd subdir |
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
47 hg -R .. cat ../a.gz |
6094
3998c1b0828f
cat --decode: Drop short option, use opts.get() instead of opts[]
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6093
diff
changeset
|
48 hg -R .. cat --decode ../a.gz | gunzip |