view tests/test-convert-bzr.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 dd24488cba2d
children
line wrap: on
line source

% create and rename on the same file in the same step
a => b
c => d
e => f
initializing destination source-hg repository
scanning source...
sorting...
converting...
1 Initial add: a, c, e
0 rename a into b, create a, rename c into d
o  1 "rename a into b, create a, rename c into d" files: a b c d e f
|
o  0 "Initial add: a, c, e" files: a c e

% manifest
a
b
d
f
% test --rev option
initializing destination source-1-hg repository
scanning source...
sorting...
converting...
0 Initial add: a, c, e
o  0 "Initial add: a, c, e" files: a c e

% test with filemap
initializing destination source-filemap-hg repository
scanning source...
sorting...
converting...
1 Initial add: a, c, e
0 rename a into b, create a, rename c into d
b
d
f
% convert from lightweight checkout
initializing destination source-light-hg repository
warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
scanning source...
sorting...
converting...
1 Initial add: a, c, e
0 rename a into b, create a, rename c into d
% lightweight manifest
a
b
d
f
% compare timestamps
good: hg timestamps match bzr timestamps
% merge
initializing destination source-hg repository
scanning source...
sorting...
converting...
3 Initial add
2 Editing a
1 Editing b
0 Merged improve branch
o    3 "Merged improve branch" files:
|\
| o  2 "Editing b" files: b
| |
o |  1 "Editing a" files: a
|/
o  0 "Initial add" files: a b

% symlinks and executable files
initializing destination source-hg repository
scanning source...
sorting...
converting...
1 Initial setup
0 Symlink changed, x bits changed
% manifest of 0
644 @ altname
644   d/a
755 * program
644 @ syma
% manifest of tip
644 @ altname
644   d/a
755 * newprog
644   program
644 @ syma
% test the symlinks can be recreated
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
a