annotate tests/test-fastimport-nonascii @ 38:3048a2dcf68a

Test that fastimport dumps with non-ASCII characters import OK.
author Greg Ward <greg-hg@gerg.ca>
date Fri, 08 May 2009 11:03:51 -0400
parents
children 7ff36dc9f0b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
1 #!/bin/sh
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
2
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
3 # Test dumps with non-ASCII characters in various places.
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
4 #
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
5 # This file, including the fastimport dumps in it and the
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
6 # associated .out file, are all encoded in UTF-8.
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
7
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
8 . $TESTDIR/fastimport-common
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
9
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
10 echo "% import dump with non-ASCII committer"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
11 cat > committer.dump <<__EOF__
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
12 commit refs/heads/master
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
13 mark :1
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
14 committer Jean-Fran??ois <jf@example.com> 1007132290 +0000
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
15 data 4
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
16 foo
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
17
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
18 __EOF__
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
19
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
20 hg init committer
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
21 cd committer
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
22 hg --traceback fastimport ../committer.dump
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
23 echo "% log with non-ASCII committer"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
24
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
25 # Overide HGENCODING (it is set to 'ascii' by run-tests.py) to ensure
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
26 # log is accurately printed.
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
27 HGENCODING=utf-8 hg log
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
28 cd ..
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
29
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
30 echo "% import dump with non-ASCII author"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
31 cat > author.dump <<__EOF__
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
32 commit refs/heads/master
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
33 mark :1
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
34 author J??rgen <juergen@example.org> 1250000000 +0400
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
35 committer Dave <dave@example.org> 1250000030 +0400
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
36 data 5
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
37 blah
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
38
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
39 __EOF__
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
40
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
41 hg init author
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
42 cd author
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
43 hg --traceback fastimport ../author.dump
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
44 echo "% log with non-ASCII author"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
45 HGENCODING=utf-8 hg log
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
46 cd ..
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
47
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
48 echo "% import dump with non-ASCII message"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
49 cat > message.dump <<__EOF__
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
50 commit refs/heads/master
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
51 mark :1
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
52 committer Dave <dave@example.org> 1250000030 +0400
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
53 data 60
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
54 fix na??ve implementation that ??le threw together for ???5
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
55
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
56 M 644 inline foo.txt
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
57 data 6
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
58 hello
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
59
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
60
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
61 __EOF__
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
62
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
63 hg init message
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
64 cd message
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
65 hg --traceback fastimport ../message.dump
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
66 echo "% log with non-ASCII message"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
67 HGENCODING=utf-8 hg log
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
68 echo "% manifest"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
69 hg manifest -r0
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
70 echo "% contents of foo.txt"
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
71 hg cat -r0 foo.txt
3048a2dcf68a Test that fastimport dumps with non-ASCII characters import OK.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
72 cd ..