Jeff Turner wrote:

>On Tue, Aug 13, 2002 at 12:06:05PM +0900, Leif Mortenson wrote:
>  
>
>>Looks like a while bunch of files got checked into the Fortress project 
>>with bad linefeeds.
>>   Wed Aug 7 19:20:36 2002 UTC (5 days, 7 hours ago) by bloritsch
>>
>>All of these files are checked with "<cr><lf>" rather than "<lf>" line 
>>feeds.  This means that on windows
>>CVS converts them to "<cr><cr><lf>" rather than "<cr><lf>".
>>    
>>
>
>Can you give an example file? They all look fine on my 'nix box.
>
Take a look at ...fortress.Container
http://cvs.apache.org/viewcvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/Container.java
Revision 1.14 was where the bad line feeds were introduced.
Changes since 1.13: +67 -67 lines

...fortress.AbstractContainer looks fine.

Browsing around in the fortress CVS tree, it looks like almost every 
file was touched at the same time.  All them
appear to have been affected.

>>Does anyone have a tool to fix these?  I think it is fairly easy to do 
>>with Emacs.  But I'm a windows user
>>and the search and replace in my editors don't handle control characters :-(
>>    
>>
>
>If you have cygwin, you might have vi or vim, in which case the command
>is something like ':%s:\r$::g'. \r matches <CR> and \n matches <LF>. That
>might work in your editor too.
>
Using a WinXP box with WinCVS, so I haven't needed Cygwin.  We had a 
problem like this in the
code base at my last company a year or so ago because we were checking 
files into CVS incorrectly.
I had written a little Java programe to take care of it.   I can see if 
I can find that at home tonight.
But figured that if someone had an editor which would allow them to a 
search and replace across
files, that would be the easiest.
I use SitePadPro.  Great editor for Java on windows.  But I don't think 
that it allows that kind of
search and replace.  It does support regular expressions, but not ctrl 
characters??

Leif

>>If someone fixes this, please make sure everything in that project is 
>>checked in and when you do a
>>commit say in the comments that the only change was a LF conversion. 
>>Makes it easier to handle
>>merges if someone out there has checked out code.
>>    
>>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to