comparison tests/test-fastimport-nonascii @ 47:7ff36dc9f0b1

Massive rework to use infrastructure provided by convert extension. fastimport no longer stages changes in the repository's working copy; instead, it now works like any other convert source: the imported history is kept in memory (except for file contents) and then processed by the 'convert' extension.
author Greg Ward <greg-hg@gerg.ca>
date Sat, 16 May 2009 12:57:22 -0400
parents 3048a2dcf68a
children
comparison
equal deleted inserted replaced
46:93c2b1e832bd 47:7ff36dc9f0b1
15 data 4 15 data 4
16 foo 16 foo
17 17
18 __EOF__ 18 __EOF__
19 19
20 # N.B. it's import to run fastimport without overriding HGENCODING,
21 # because we need to be sure that UTF-8 metadata is correctly converted
22 # even when the default encoding is ASCII. The catch is that the
23 # converted commit messages will be mangled as they are printed to
24 # stdout. That's OK. The real test is when we run hg log, and there we
25 # set HGENCODING to ensure that hg accurately prints what's in the
26 # repository.
27
20 hg init committer 28 hg init committer
21 cd committer 29 cd committer
22 hg --traceback fastimport ../committer.dump 30 hg --traceback fastimport ../committer.dump
23 echo "% log with non-ASCII committer" 31 echo "% log with non-ASCII committer"
24
25 # Overide HGENCODING (it is set to 'ascii' by run-tests.py) to ensure
26 # log is accurately printed.
27 HGENCODING=utf-8 hg log 32 HGENCODING=utf-8 hg log
28 cd .. 33 cd ..
29 34
30 echo "% import dump with non-ASCII author" 35 echo "% import dump with non-ASCII author"
31 cat > author.dump <<__EOF__ 36 cat > author.dump <<__EOF__
60 65
61 __EOF__ 66 __EOF__
62 67
63 hg init message 68 hg init message
64 cd message 69 cd message
65 hg --traceback fastimport ../message.dump 70 hg --traceback fastimport ../message.dump | sed "s|$HGTMP|HGTMP|g"
66 echo "% log with non-ASCII message" 71 echo "% log with non-ASCII message"
67 HGENCODING=utf-8 hg log 72 HGENCODING=utf-8 hg log
68 echo "% manifest" 73 echo "% manifest"
69 hg manifest -r0 74 hg manifest -r0
70 echo "% contents of foo.txt" 75 echo "% contents of foo.txt"