tests/test-merge4
author Martin Geisler <mg@lazybytes.net>
Thu, 26 Nov 2009 20:06:45 +0100
branchstable
changeset 9941 11d7ee94b56a
parent 2283 e506c14382fd
permissions -rwxr-xr-x
extdiff: prevent exception on double-translation The docstring is translated twice: once when used as a format string, and once on display. The second translation fails when the first translation introduces non-ASCII characters in the string. The problem is that the gettext module calls unicode(message) on the string, i.e., it decodes it to a Unicode string using the ASCII encoding (the default encoding). By translating it into a Unicode string here, the unicode() call becomes a noop.

#!/bin/sh

hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
hg update 0
echo This is file c1 > c
hg add c
hg commit -m "commit #2" -d "1000000 0"
hg merge 1
rm b
echo This is file c22 > c
hg commit -m "commit #3" -d "1000000 0"