Show More
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -1,46 +1,28 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init t |
|
3 | hg init t | |
4 | cd t |
|
4 | cd t | |
5 |
|
5 | |||
6 | # we need a repo with some legacy latin-1 changesets |
|
6 | # we need a repo with some legacy latin-1 changesets | |
7 | printf 'HG10BZh91AY&SY\x90\x8e\xff\xaa\x00\x00\t\xff\xff\xde\x99' > b.hg |
|
7 | hg unbundle $TESTDIR/legacy-encoding.hg | |
8 | printf '\xc4\x02T\x9a\x7f\xf0\x14\x10\xa2\x14\x7fgL\x08\x00(\x00' >> b.hg |
|
|||
9 | printf '\x04Pr\x06\xae\x11\xc0 b\x88\x21I\x020\x00\xb8\xd8j\x93@h\x00' >> b.hg |
|
|||
10 | printf '\xd0z\x86\x83@\x01\x90\x01\xa6\x81\xa3M\x1a4\xd3M=B\xa4' >> b.hg |
|
|||
11 | printf '\xc9\xa1\xe4F \r2\x03@\x01\xa1\xa1\x84\xd0\xc8\xc9\x91\xa6' >> b.hg |
|
|||
12 | printf '\x83 ji\x27\xa4\xd0\xd0\x00\x86h\x010\x1a\x06\xa6=F\x80\x01' >> b.hg |
|
|||
13 | printf '\xa2`\x8cW\xb9O7\x7f\x27A\x80\xb0\xf0\xe0\x18\x1c\xb5\x12' >> b.hg |
|
|||
14 | printf '\xe4g\xc4f\x101\xcb\\\xb79\xe2\xb8\x0c\x81\xa1Z>\x00\xb3' >> b.hg |
|
|||
15 | printf '\xce\t\xb0\xdc\x8a\xc3\x7f\xa0RLd\xc1\xbb\x7f\xe6\xf3\xb6' >> b.hg |
|
|||
16 | printf 'R\xa2\xd7Q\r\x04t\x12O}\x0fI\x08P\x82\xf3\x9f\xaa\xb3\xe5' >> b.hg |
|
|||
17 | printf 'Z:\xe7\xbd\x1f\x10\x10\x80\xff\xde\x03\x80q\x03(\r\x80\xe2' >> b.hg |
|
|||
18 | printf 'M\xc9\xa6\xff&g\xfa\x8d\xaf\x87\xc2\x8e\xbe\xd8t\x81\xe4\"M' >> b.hg |
|
|||
19 | printf '\x84l\xf3\x10\xb3\xa4<\xa0\\\xcd2\xf5\xf0\x98D\x8db\x0e' >> b.hg |
|
|||
20 | printf '\x02\xa8\x14\x13\x19\x00\x0f\x15o\xbdY7\xb1&\xd4\x8f\xca' >> b.hg |
|
|||
21 | printf '\x9d|\xbf \x04\x01\x80\x19\xf6\xc0\x14l6\xe4\x86\x99L\x06' >> b.hg |
|
|||
22 | printf '\xfe\x00\xd1]\x00\xbff\x15\xdf\xc5\xa9\x9f\xf8\xbb\x92)' >> b.hg |
|
|||
23 | printf '\xc2\x84\x84\x84w\xfdP' >> b.hg |
|
|||
24 |
|
||||
25 | hg unbundle b.hg |
|
|||
26 | hg co |
|
8 | hg co | |
27 |
|
9 | |||
28 | echo % should fail with encoding error |
|
10 | echo % should fail with encoding error | |
29 | echo "plain old ascii" > a |
|
11 | echo "plain old ascii" > a | |
30 | hg st |
|
12 | hg st | |
31 | HGENCODING=ascii hg ci -m "`printf "ascii 0xe9: \xe9"`" -d "0 0" |
|
13 | HGENCODING=ascii hg ci -m "`printf "ascii 0xe9: \xe9"`" -d "0 0" | |
32 |
|
14 | |||
33 | echo % these should work |
|
15 | echo % these should work | |
34 | echo "latin-1" > a |
|
16 | echo "latin-1" > a | |
35 | HGENCODING=latin-1 hg ci -m "`printf "latin-1 e' encoded: \xe9"`" -d "0 0" |
|
17 | HGENCODING=latin-1 hg ci -m "`printf "latin-1 e' encoded: \xe9"`" -d "0 0" | |
36 | echo "utf-8" > a |
|
18 | echo "utf-8" > a | |
37 | HGENCODING=utf-8 hg ci -m "`printf "utf-8 e': \xc3\xa9"`" -d "0 0" |
|
19 | HGENCODING=utf-8 hg ci -m "`printf "utf-8 e': \xc3\xa9"`" -d "0 0" | |
38 |
|
20 | |||
39 | HGENCODING=latin-1 hg tag -d "0 0" "`printf "\xe9"`" |
|
21 | HGENCODING=latin-1 hg tag -d "0 0" "`printf "\xe9"`" | |
40 |
|
22 | |||
41 | hg --encoding ascii log |
|
23 | hg --encoding ascii log | |
42 | hg --encoding latin-1 log |
|
24 | hg --encoding latin-1 log | |
43 | hg --encoding utf-8 log |
|
25 | hg --encoding utf-8 log | |
44 | HGENCODING=ascii hg tags |
|
26 | HGENCODING=ascii hg tags | |
45 | HGENCODING=latin-1 hg tags |
|
27 | HGENCODING=latin-1 hg tags | |
46 | HGENCODING=utf-8 hg tags |
|
28 | HGENCODING=utf-8 hg tags |
@@ -1,86 +1,85 | |||||
1 | adding changesets |
|
1 | adding changesets | |
2 | adding manifests |
|
2 | adding manifests | |
3 | adding file changes |
|
3 | adding file changes | |
4 | added 1 changesets with 1 changes to 1 files |
|
4 | added 1 changesets with 1 changes to 1 files | |
5 | (run 'hg update' to get a working copy) |
|
5 | (run 'hg update' to get a working copy) | |
6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
7 | % should fail with encoding error |
|
7 | % should fail with encoding error | |
8 | M a |
|
8 | M a | |
9 | ? b.hg |
|
|||
10 | abort: decoding near 'cii 0xe9: �': 'ascii' codec can't decode byte 0xe9 in position 12: ordinal not in range(128)! |
|
9 | abort: decoding near 'cii 0xe9: �': 'ascii' codec can't decode byte 0xe9 in position 12: ordinal not in range(128)! | |
11 |
|
10 | |||
12 | transaction abort! |
|
11 | transaction abort! | |
13 | rollback completed |
|
12 | rollback completed | |
14 | % these should work |
|
13 | % these should work | |
15 | changeset: 3:d6b63b86e629 |
|
14 | changeset: 3:d6b63b86e629 | |
16 | tag: tip |
|
15 | tag: tip | |
17 | user: test |
|
16 | user: test | |
18 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
17 | date: Thu Jan 01 00:00:00 1970 +0000 | |
19 | summary: Added tag ? for changeset 20ea57f280ca |
|
18 | summary: Added tag ? for changeset 20ea57f280ca | |
20 |
|
19 | |||
21 | changeset: 2:20ea57f280ca |
|
20 | changeset: 2:20ea57f280ca | |
22 | tag: ? |
|
21 | tag: ? | |
23 | user: test |
|
22 | user: test | |
24 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
23 | date: Thu Jan 01 00:00:00 1970 +0000 | |
25 | summary: utf-8 e': ? |
|
24 | summary: utf-8 e': ? | |
26 |
|
25 | |||
27 | changeset: 1:6355cacf842e |
|
26 | changeset: 1:6355cacf842e | |
28 | user: test |
|
27 | user: test | |
29 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
28 | date: Thu Jan 01 00:00:00 1970 +0000 | |
30 | summary: latin-1 e' encoded: ? |
|
29 | summary: latin-1 e' encoded: ? | |
31 |
|
30 | |||
32 | changeset: 0:60aad1dd20a9 |
|
31 | changeset: 0:60aad1dd20a9 | |
33 | user: test |
|
32 | user: test | |
34 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
33 | date: Thu Jan 01 00:00:00 1970 +0000 | |
35 | summary: latin-1 e': ? |
|
34 | summary: latin-1 e': ? | |
36 |
|
35 | |||
37 | changeset: 3:d6b63b86e629 |
|
36 | changeset: 3:d6b63b86e629 | |
38 | tag: tip |
|
37 | tag: tip | |
39 | user: test |
|
38 | user: test | |
40 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
39 | date: Thu Jan 01 00:00:00 1970 +0000 | |
41 | summary: Added tag � for changeset 20ea57f280ca |
|
40 | summary: Added tag � for changeset 20ea57f280ca | |
42 |
|
41 | |||
43 | changeset: 2:20ea57f280ca |
|
42 | changeset: 2:20ea57f280ca | |
44 | tag: � |
|
43 | tag: � | |
45 | user: test |
|
44 | user: test | |
46 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
45 | date: Thu Jan 01 00:00:00 1970 +0000 | |
47 | summary: utf-8 e': � |
|
46 | summary: utf-8 e': � | |
48 |
|
47 | |||
49 | changeset: 1:6355cacf842e |
|
48 | changeset: 1:6355cacf842e | |
50 | user: test |
|
49 | user: test | |
51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
50 | date: Thu Jan 01 00:00:00 1970 +0000 | |
52 | summary: latin-1 e' encoded: � |
|
51 | summary: latin-1 e' encoded: � | |
53 |
|
52 | |||
54 | changeset: 0:60aad1dd20a9 |
|
53 | changeset: 0:60aad1dd20a9 | |
55 | user: test |
|
54 | user: test | |
56 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
55 | date: Thu Jan 01 00:00:00 1970 +0000 | |
57 | summary: latin-1 e': � |
|
56 | summary: latin-1 e': � | |
58 |
|
57 | |||
59 | changeset: 3:d6b63b86e629 |
|
58 | changeset: 3:d6b63b86e629 | |
60 | tag: tip |
|
59 | tag: tip | |
61 | user: test |
|
60 | user: test | |
62 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
61 | date: Thu Jan 01 00:00:00 1970 +0000 | |
63 | summary: Added tag é for changeset 20ea57f280ca |
|
62 | summary: Added tag é for changeset 20ea57f280ca | |
64 |
|
63 | |||
65 | changeset: 2:20ea57f280ca |
|
64 | changeset: 2:20ea57f280ca | |
66 | tag: é |
|
65 | tag: é | |
67 | user: test |
|
66 | user: test | |
68 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
67 | date: Thu Jan 01 00:00:00 1970 +0000 | |
69 | summary: utf-8 e': é |
|
68 | summary: utf-8 e': é | |
70 |
|
69 | |||
71 | changeset: 1:6355cacf842e |
|
70 | changeset: 1:6355cacf842e | |
72 | user: test |
|
71 | user: test | |
73 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
72 | date: Thu Jan 01 00:00:00 1970 +0000 | |
74 | summary: latin-1 e' encoded: é |
|
73 | summary: latin-1 e' encoded: é | |
75 |
|
74 | |||
76 | changeset: 0:60aad1dd20a9 |
|
75 | changeset: 0:60aad1dd20a9 | |
77 | user: test |
|
76 | user: test | |
78 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
77 | date: Thu Jan 01 00:00:00 1970 +0000 | |
79 | summary: latin-1 e': é |
|
78 | summary: latin-1 e': é | |
80 |
|
79 | |||
81 | tip 3:d6b63b86e629 |
|
80 | tip 3:d6b63b86e629 | |
82 | ? 2:20ea57f280ca |
|
81 | ? 2:20ea57f280ca | |
83 | tip 3:d6b63b86e629 |
|
82 | tip 3:d6b63b86e629 | |
84 | � 2:20ea57f280ca |
|
83 | � 2:20ea57f280ca | |
85 | tip 3:d6b63b86e629 |
|
84 | tip 3:d6b63b86e629 | |
86 | é 2:20ea57f280ca |
|
85 | é 2:20ea57f280ca |
General Comments 0
You need to be logged in to leave comments.
Login now