From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Converting end of lines from CRLF to LF Date: Sun, 13 Dec 2009 21:04:38 +0200 Message-ID: <83vdga7l15.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1260730977 28917 80.91.229.12 (13 Dec 2009 19:02:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Dec 2009 19:02:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: A Soare Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 13 20:02:49 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJtiS-00024Z-Hl for ged-emacs-devel@m.gmane.org; Sun, 13 Dec 2009 20:02:48 +0100 Original-Received: from localhost ([127.0.0.1]:46078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJtiS-0005rx-Cu for ged-emacs-devel@m.gmane.org; Sun, 13 Dec 2009 14:02:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJtiM-0005rM-TM for emacs-devel@gnu.org; Sun, 13 Dec 2009 14:02:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJtiI-0005qK-Bl for emacs-devel@gnu.org; Sun, 13 Dec 2009 14:02:42 -0500 Original-Received: from [199.232.76.173] (port=59678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJtiI-0005qH-8M for emacs-devel@gnu.org; Sun, 13 Dec 2009 14:02:38 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:45052) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJtiG-0007QV-1Q for emacs-devel@gnu.org; Sun, 13 Dec 2009 14:02:37 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0KUL00000U5D6M00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sun, 13 Dec 2009 21:02:34 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.160.137]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KUL00MMXU89S930@a-mtaout23.012.net.il>; Sun, 13 Dec 2009 21:02:34 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118592 Archived-At: > From: A Soare > 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.