view tests/test-convert-darcs.out @ 12717:89df79b3c011 stable

convert/darcs: support changelogs with bytes 0x7F-0xFF (issue2411) This is a followup to 4481f8a93c7a, which only fixed the conversion of patches with UTF-8 metadata. This patch allows a changelog to have any bytes with values 0x7F-0xFF. It parses the XML changelog as Latin-1 and uses converter_source.recode() to decode the data as UTF-8/Latin-1. Caveats: - Since the convert extension doesn't provide any way to specify the source encoding, users are still limited to UTF-8 and Latin-1. - etree will still complain if the changelog has bytes with values 0x00-0x19. XML only allows printable characters.
author Brodie Rao <brodie@bitheap.org>
date Fri, 01 Oct 2010 10:15:04 -0500
parents 84ceedcfeb6a
children
line wrap: on
line source

% try converting darcs1 repository
darcs-1.0 repository format is unsupported, please upgrade
% initialize darcs repo
Finished recording patch 'p0'
% branch and update
Finished recording patch 'p1.1'
% update source
Finished recording patch 'p1.2'
% merge branch
Backing up ./a(-darcs-backup0)
We have conflicts in the following files:
./a
Finished pulling and applying.
Finished recording patch 'p2'
% test file and directory move
Finished recording patch 'p3'
% test utf-8 commit message and author
Finished recording patch 'p4: desc ñ'
% test latin-1 commit message
Finished recording patch 'p5: desc '
initializing destination darcs-repo-hg repository
scanning source...
sorting...
converting...
6 p0
5 p1.2
4 p1.1
3 p2
2 p3
1 p4: desc ?
0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
o  6 "p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" (test@example.org) files: h
|
o  5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g
|
o  4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
|
o  3 "p2" (test@example.org) files: a dir/d dir/d2 f
|
o  2 "p1.1" (test@example.org) files:
|
o  1 "p1.2" (test@example.org) files: a b
|
o  0 "p0" (test@example.org) files: a

7225b30cdf38257d5cc7780772c051b6f33e6d6b 644   a
1e88685f5ddec574a34c70af492f95b6debc8741 644   b
37406831adc447ec2385014019599dfec953c806 644   dir2/d
b783a337463792a5c7d548ad85a7d3253c16ba8c 644   ff
0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644   g
fe6f8b4f507fe3eb524c527192a84920a4288dac 644   h