test-encode
48 lines
| 770 B
| text/plain
|
TextLexer
/ tests / test-encode
mpm@selenic.com
|
r1258 | #!/bin/sh | ||
hg init | ||||
cat > .hg/hgrc <<EOF | ||||
[encode] | ||||
Mads Kiilerich
|
r10279 | not.gz = tr [:lower:] [:upper:] | ||
Patrick Mezard
|
r7080 | *.gz = gzip -d | ||
mpm@selenic.com
|
r1258 | |||
[decode] | ||||
Mads Kiilerich
|
r10279 | not.gz = tr [:upper:] [:lower:] | ||
mpm@selenic.com
|
r1258 | *.gz = gzip | ||
EOF | ||||
echo "this is a test" | gzip > a.gz | ||||
Mads Kiilerich
|
r10211 | echo "this is a test" > not.gz | ||
hg add * | ||||
Thomas Arendsen Hein
|
r1933 | hg ci -m "test" -d "1000000 0" | ||
mpm@selenic.com
|
r1258 | echo %% no changes | ||
hg status | ||||
Mads Kiilerich
|
r10211 | touch * | ||
mpm@selenic.com
|
r1258 | |||
echo %% no changes | ||||
hg status | ||||
Mads Kiilerich
|
r10211 | echo %% check contents in repo are encoded | ||
Benoit Boissinot
|
r3853 | hg debugdata .hg/store/data/a.gz.d 0 | ||
Mads Kiilerich
|
r10211 | hg debugdata .hg/store/data/not.gz.d 0 | ||
mpm@selenic.com
|
r1258 | |||
Mads Kiilerich
|
r10211 | echo %% check committed content was decoded | ||
mpm@selenic.com
|
r1258 | gunzip < a.gz | ||
Mads Kiilerich
|
r10211 | cat not.gz | ||
mpm@selenic.com
|
r1258 | |||
Mads Kiilerich
|
r10211 | rm * | ||
Matt Mackall
|
r8742 | hg co -C | ||
mpm@selenic.com
|
r1258 | |||
Mads Kiilerich
|
r10211 | echo %% check decoding of our new working dir copy | ||
mpm@selenic.com
|
r1258 | gunzip < a.gz | ||
Mads Kiilerich
|
r10211 | cat not.gz | ||
Jesse Glick
|
r6093 | |||
echo %% check hg cat operation | ||||
hg cat a.gz | ||||
Thomas Arendsen Hein
|
r6094 | hg cat --decode a.gz | gunzip | ||
Jesse Glick
|
r6093 | mkdir subdir | ||
cd subdir | ||||
hg -R .. cat ../a.gz | ||||
Thomas Arendsen Hein
|
r6094 | hg -R .. cat --decode ../a.gz | gunzip | ||