delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/16/10:31:41

X-Spam-Check-By: sourceware.org
Message-ID: <43A2DDC7.9080802@student.lu.se>
Date: Fri, 16 Dec 2005 16:31:19 +0100
From: Lennart Borgman <lennart DOT borgman DOT 073 AT student DOT lu DOT se>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT gnu DOT org>
CC: cygwin AT cygwin DOT com
Subject: Re: Patch and Cygwin
References: <SERRANOMu3QTYCrtU2b00000042 AT SERRANO DOT CAM DOT ARTIMI DOT COM> <43A1ACC1 DOT 9090805 AT student DOT lu DOT se> <43A1B2A1 DOT 2020907 AT student DOT lu DOT se> <43A20542 DOT 1050405 AT student DOT lu DOT se> <uoe3hphdk DOT fsf AT gnu DOT org> <43A2834A DOT 8000900 AT student DOT lu DOT se> <ud5jxp9n4 DOT fsf AT gnu DOT org>
In-Reply-To: <ud5jxp9n4.fsf@gnu.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Eli Zaretskii wrote:

>What's wrong with the patched file having CRLF on Windows?
>  
>
It is the default line endings on Windows so normally that is what you 
want. However if you have a file with LF line endings instead then don't 
you probably have that for a reason? I can of course not know the 
reason, but I guess there is some.

I am not for example convinced that all cvs implementations on Windows 
can handle that a checked out file has got changed line end format. In 
fact I believe I have read that they can not, but I am not sure here 
either. In any case it seems better to try to avoid problems.

>But why should I care about these strange combinations on Windows?
>Why isn't it enough that patching Unix-style files with Unix-style
>patch files works (using --binary) and preserves the EOL type, and
>patching DOS-style files with DOS-style patch files also works?
>  
>
I do not know if you should care, but I do. It just happened to me that 
things did not work because of one of these other non-working 
combinations did occur for me. I did not first understand what happened. 
I thought that maybe the file to patch had changed and not until I got a 
message from others that the patch worked for them did I think of the 
problem with CR-LF/LF. (The patch file to my surprise had LF endings. In 
my opinion this should not have happened. I got a bit fooled by Emacs here.)

Now these surprising situations may take a lot of time when you got into 
them. Especially for someone not used to them. As you surely know I am 
trying to get more people on Windows to use Emacs and my interest in 
patch and Cygwin comes out of this. Those people I think of are Windows 
users. Maybe they have a long background in computers, but that does not 
help very much when there is too many things that just does not work 
out-of-the-box.

>Why the perfectionism?  If the usual cases work so well, why do we
>want to insist on looking for trouble at all costs?
>  
>
I hope it is not perfectionism. If you like me do many different things 
with a computer you are likely to get into cases like those I have as 
test cases. I can hardly touch a computer without finding something that 
does not work on it ;-)


>Because I can find no other explanation for the fact that the test
>that failed for you worked for me.  Maybe you should try installing
>all the utilities again, make sure what Diff and what Patch runs in
>each command, and see whether gnuwin32-test.cmd indeed fails for you.
>  
>
Could we be misunderstanding each other? Which test case worked for you 
but failed for me?

>I didn't run the shell scripts because
>there's no GnuWin32 port of Bash, and because I didn't want to mix the
>Diff/Patch issue with the shell behavior.
>  
>
checkresults.sh just reads the output from the test and presents that in 
a condensed manner. It could be run from most shells I believe (but the 
test for ^M is perhaps a bit weak ...)

>That will not be easy using the techniques you tried in sh-tests, I
>suspect.  Perhaps "od -c" is a good start.
>  
>
You are right, I will try something else.

Thanks for the answers.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019