[issue302] win32text corrupts working dir files

Raphaël Marmier mercurial-bugs at selenic.com
Thu Jun 29 05:36:39 CDT 2006


New submission from Raphaël Marmier <raphael at marmier.net>:

win32text corrupts working dir files

On windows, the default settings of the win32text extension corrupts files in
the working directory when these files are text files with line ending with CRLF.

win32text seems to assume LF line endings for all files in the repo and adds a
CR in front of all LF it finds in the file upon copying to the working dir.

P:\>hg version
Mercurial Distributed SCM (version 90368f89340a)

Copyright (C) 2005 Matt Mackall <mpm at selenic.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

P:\>hg debugconfig
encode.**=cleverencode:
decode.**=cleverdecode:
extensions.hgext.win32text=

The /bin/sh script in attachement creates a small repo that can be used to
demonstrate the behaviour.


This is with version 90368f89340a and later on windows XP/2000 installed with
the binary installer.

win32text should check wether text files already have CR or not.

----------
files: test_win32text_corrupt.sh
messages: 1616
nosy: raphael
priority: urgent
status: unread
title: win32text corrupts working dir files

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue302>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_win32text_corrupt.sh
Type: application/octet-stream
Size: 674 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20060629/7a4267f2/test_win32text_corrupt.obj


More information about the Mercurial mailing list