Mercurial > hg-stable
changeset 9542:5287de171d74
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 05 Oct 2009 22:17:39 +0200 |
parents | 53a95a744812 (current diff) 314fc589b313 (diff) |
children | 56a5f80556f5 |
files | hgext/convert/common.py |
diffstat | 3 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/common.py Sun Oct 04 23:16:54 2009 +0200 +++ b/hgext/convert/common.py Mon Oct 05 22:17:39 2009 +0200 @@ -365,7 +365,7 @@ return for i, line in enumerate(fp): try: - key, value = line[:-1].rsplit(' ', 1) + key, value = line.splitlines()[0].rsplit(' ', 1) except ValueError: raise util.Abort(_('syntax error in %s(%d): key/value pair expected') % (self.path, i+1))
--- a/tests/test-convert-hg-source Sun Oct 04 23:16:54 2009 +0200 +++ b/tests/test-convert-hg-source Mon Oct 05 22:17:39 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
--- a/tests/test-convert-hg-source.out Sun Oct 04 23:16:54 2009 +0200 +++ b/tests/test-convert-hg-source.out Mon Oct 05 22:17:39 2009 +0200 @@ -20,6 +20,12 @@ comparing with ../orig searching for changes no changes found +% check shamap LF and CRLF handling +scanning source... +sorting... +converting... +1 change foo again again +0 change foo again % init broken repository created new head % break it