author | Simon Sapin <simon.sapin@octobus.net> |
Tue, 09 Nov 2021 19:55:46 +0100 | |
changeset 48335 | b7fde9237c92 |
parent 37461 | 538353b80676 |
child 48339 | a2e278b5e265 |
permissions | -rw-r--r-- |
48335
b7fde9237c92
rhg: Enable `rhg status` in most tests
Simon Sapin <simon.sapin@octobus.net>
parents:
37461
diff
changeset
|
1 |
TODO: fix rhg bugs that make this test fail when status is enabled |
b7fde9237c92
rhg: Enable `rhg status` in most tests
Simon Sapin <simon.sapin@octobus.net>
parents:
37461
diff
changeset
|
2 |
$ unset RHG_STATUS |
b7fde9237c92
rhg: Enable `rhg status` in most tests
Simon Sapin <simon.sapin@octobus.net>
parents:
37461
diff
changeset
|
3 |
|
b7fde9237c92
rhg: Enable `rhg status` in most tests
Simon Sapin <simon.sapin@octobus.net>
parents:
37461
diff
changeset
|
4 |
|
12416 | 5 |
Test encode/decode filters |
1258 | 6 |
|
12416 | 7 |
$ hg init |
8 |
$ cat > .hg/hgrc <<EOF |
|
9 |
> [encode] |
|
10 |
> not.gz = tr [:lower:] [:upper:] |
|
11 |
> *.gz = gzip -d |
|
12 |
> [decode] |
|
13 |
> not.gz = tr [:upper:] [:lower:] |
|
14 |
> *.gz = gzip |
|
15 |
> EOF |
|
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" |
|
1258 | 20 |
|
12416 | 21 |
no changes |
22 |
||
23 |
$ hg status |
|
24 |
$ touch * |
|
25 |
||
26 |
no changes |
|
27 |
||
28 |
$ hg status |
|
29 |
||
30 |
check contents in repo are encoded |
|
1258 | 31 |
|
14182
ec5886db9dc6
tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents:
12416
diff
changeset
|
32 |
$ hg debugdata a.gz 0 |
12416 | 33 |
this is a test |
14182
ec5886db9dc6
tests: fix deprecated use of hg debugdata/debugindex
Sune Foldager <cryo@cyanite.org>
parents:
12416
diff
changeset
|
34 |
$ hg debugdata not.gz 0 |
12416 | 35 |
THIS IS A TEST |
36 |
||
37 |
check committed content was decoded |
|
1258 | 38 |
|
12416 | 39 |
$ gunzip < a.gz |
40 |
this is a test |
|
41 |
$ cat not.gz |
|
42 |
this is a test |
|
43 |
$ rm * |
|
44 |
$ hg co -C |
|
45 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1258 | 46 |
|
12416 | 47 |
check decoding of our new working dir copy |
1258 | 48 |
|
12416 | 49 |
$ gunzip < a.gz |
50 |
this is a test |
|
51 |
$ cat not.gz |
|
52 |
this is a test |
|
1258 | 53 |
|
12416 | 54 |
check hg cat operation |
6093
f5b00b6e426a
Option --decode for hg cat to apply decode filters.
Jesse Glick <jesse.glick@sun.com>
parents:
3853
diff
changeset
|
55 |
|
12416 | 56 |
$ hg cat a.gz |
57 |
this is a test |
|
58 |
$ hg cat --decode a.gz | gunzip |
|
59 |
this is a test |
|
60 |
$ mkdir subdir |
|
61 |
$ cd subdir |
|
62 |
$ hg -R .. cat ../a.gz |
|
63 |
this is a test |
|
64 |
$ hg -R .. cat --decode ../a.gz | gunzip |
|
65 |
this is a test |
|
37461
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
66 |
$ cd .. |
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
67 |
|
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
68 |
check tempfile filter |
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
69 |
|
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
70 |
$ hg cat a.gz --decode --config 'decode.*.gz=tempfile:gzip -c INFILE > OUTFILE' | gunzip |
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
71 |
this is a test |
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
72 |
$ hg cat a.gz --decode --config 'decode.*.gz=tempfile:sh -c "exit 1"' |
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
73 |
abort: command '*' failed: exited with status 1 (glob) |
538353b80676
procutil: fix error message of tempfile filter
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
74 |
[255] |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
14182
diff
changeset
|
75 |
|
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
14182
diff
changeset
|
76 |
$ cd .. |