Mercurial > hg
annotate tests/test-convert-darcs.out @ 12252:4481f8a93c7a stable
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Given a commit author or message with non-ASCII characters in a darcs
repo, convert would raise a UnicodeEncodeError when adding changesets
to the hg changelog.
This happened because etree returns back unicode objects for any text
it can't encode into ASCII. convert was passing these objects to
changelog.add(), which would then attempt encoding.fromlocal() on
them.
This patch ensures converter_source.recode() is called on each piece
of commit data returned by etree.
(Also note that darcs is currently encoding agnostic and will print
out whatever is in a patch's metadata byte-for-byte, even in the XML
changelog.)
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Fri, 10 Sep 2010 09:30:50 -0500 |
parents | f2618cacb485 |
children | 84ceedcfeb6a |
rev | line source |
---|---|
5413 | 1 % initialize darcs repo |
2 Finished recording patch 'p0' | |
3 % branch and update | |
4 Finished recording patch 'p1.1' | |
5 % update source | |
6 Finished recording patch 'p1.2' | |
7 % merge branch | |
9326
b236f34ec1e9
Fix failing darcs test
Bryan O'Sullivan <bos@serpentine.com>
parents:
5667
diff
changeset
|
8 Backing up ./a(-darcs-backup0) |
5413 | 9 We have conflicts in the following files: |
10 ./a | |
11 Finished pulling and applying. | |
12 Finished recording patch 'p2' | |
9526
457a30ed8ffb
convert/darcs: fix file renaming (issue1853)
Patrick Mezard <pmezard@gmail.com>
parents:
9326
diff
changeset
|
13 % test file and directory move |
457a30ed8ffb
convert/darcs: fix file renaming (issue1853)
Patrick Mezard <pmezard@gmail.com>
parents:
9326
diff
changeset
|
14 Finished recording patch 'p3' |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
15 % test utf-8 commit message and author |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
16 Finished recording patch 'p4: desc ñ' |
5413 | 17 initializing destination darcs-repo-hg repository |
18 scanning source... | |
19 sorting... | |
20 converting... | |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
21 5 p0 |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
22 4 p1.2 |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
23 3 p1.1 |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
24 2 p2 |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
25 1 p3 |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
26 0 p4: desc ? |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
27 o 5 "p4: desc ñ" (author ñ) files: g |
9526
457a30ed8ffb
convert/darcs: fix file renaming (issue1853)
Patrick Mezard <pmezard@gmail.com>
parents:
9326
diff
changeset
|
28 | |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
29 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff |
5413 | 30 | |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
31 o 3 "p2" (test@example.org) files: a dir/d dir/d2 f |
5413 | 32 | |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
33 o 2 "p1.1" (test@example.org) files: |
5413 | 34 | |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
35 o 1 "p1.2" (test@example.org) files: a b |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
36 | |
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
37 o 0 "p0" (test@example.org) files: a |
5413 | 38 |
39 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a | |
40 1e88685f5ddec574a34c70af492f95b6debc8741 644 b | |
10490
f2618cacb485
filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
9527
diff
changeset
|
41 37406831adc447ec2385014019599dfec953c806 644 dir2/d |
f2618cacb485
filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
9527
diff
changeset
|
42 b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff |
12252
4481f8a93c7a
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354)
Brodie Rao <brodie@bitheap.org>
parents:
10490
diff
changeset
|
43 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g |