Mercurial > public > mercurial-scm > hg-stable
diff tests/test-convert-hg-source @ 9528:314fc589b313
convert: make mapfile handle LF and CRLF shamap (issue1846)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 05 Oct 2009 22:01:08 +0200 |
parents | 8e7130a10f3b |
children | a2f11188e2d2 |
line wrap: on
line diff
--- a/tests/test-convert-hg-source Sun Oct 04 23:06:14 2009 +0200 +++ b/tests/test-convert-hg-source Mon Oct 05 22:01:08 2009 +0200 @@ -38,6 +38,25 @@ hg out ../orig cd .. +echo '% check shamap LF and CRLF handling' +cat > rewrite.py <<EOF +import sys +# Interlace LF and CRLF +lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n')) + for i, l in enumerate(file(sys.argv[1]))] +file(sys.argv[1], 'wb').write(''.join(lines)) +EOF +python rewrite.py new/.hg/shamap +cd orig +hg up -qC 1 +echo foo >> foo +hg ci -qm 'change foo again' +hg up -qC 2 +echo foo >> foo +hg ci -qm 'change foo again again' +cd .. +hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' + echo % init broken repository hg init broken cd broken