emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting end of lines from CRLF to LF


From: Eli Zaretskii
Subject: Re: Converting end of lines from CRLF to LF
Date: Sun, 13 Dec 2009 21:04:38 +0200

> From: A Soare <address@hidden>
> Date: Sun, 13 Dec 2009 18:13:07 +0000 (UTC)
> 
> I had access to cvs for windows. I downloaded the sources of emacs, and I 
> tried
> to apply a patch on. My surprise was to see that absolutely all the patches
> failed: hunk failed.
> 
> I debugged patch more than 20 hours to understand how it works. Finally, I did
> understand: it failed to match the context lines in the destination files, as
> the end of line did not match.
> 
> I tried to convert all the sources of emacs that were downloaded using a cvs 
> on
> Windows, so the lines finish in CRLF.
> 
> I tried to convert all the sources using a script like that
> 
> for i in `find`; do if test -d $if; then mkdir -p $i; else tr -d
>  "\015" <$i >/e/$i;done
> 
> I created the new directory structure, but during dumping emacs, temacs 
> returns
> error in loading internationalization.
> 
> That means that tr deleted the character 0xd somewhere inside the file, apart
> from end of line. It is impossible to detect in which file it deleted 
> something
> tha it should have not deleted.
> 
> Any idea about how to make this conversion?

The only sane way is to checkout in binary mode:

   cvs ... co -kb emacs

Sadly, this means you will have to remove the entire tree you have and
checkout anew.

To apply patches after that, make sure the patch is also in Unix
format (e.g., by running the patch through dos2unix or some such), and
then invoke Patch with the --binary switch.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]