[darcs-users] Windows end-of-line characters
David Roundy
droundy at abridgegame.org
Mon Jun 21 09:42:35 UTC 2004
On Mon, Jun 21, 2004 at 12:04:39PM +1000, Peter Maxwell wrote:
> This issue has been causing me problems. Here is what I think I know:
>
> Windows text file lines are terminated with CR LF, unix with just LF.
>
> Most version control software automatically (sometimes optionaly)
> converts text files to have native EOLs, so the same file will have
> CRLF on windows and LF on unix. GPG does something similar, in some
> modes. So do email clients, web browsers etc.
>
> darcs doesn't yet have a policy on end-of-line characters. Current
> behaviour is mostly to not do any such conversions.
As a matter of fact, darcs *does* have a policy on such conversions, and
that is not to do them. This was discussed a while back, and the concensus
was that darcs shouldn't modify your files when taking them from one
platform to another.
> There is an exception: if a patch is sent directly via sendmail at any
> point (ie: darcs send from a unix machine) the line endings will be
> converted to those native to the target machine. Side issue: lines
> over 1000 characters long also get wrapped by sendmail.
>
> The solution would be to always MIME encode mailed patches. That would
> remove the differences in the behaviour of a mailed patch and a copied
> patch which can lead to "Error applying patch to recorded" etc.
Hmmmm. This definitely is a problem. One thing on my (long) TODO list has
been to write a hex decoder to deal with patches sent via MAPI. I believe
if you use MAPI on windows it currently does MIME encode when you darcs
send (for precisely this reason).
Another good idea would be to add a checksum to each patch bundle, so we
could catch situations where a mailer has trashed a patch.
--
David Roundy
http://www.abridgegame.org
More information about the darcs-users
mailing list