[BUG]DVS breaks FileContentsBrowser diffing
Jimmie Houchin
jhouchin at texoma.net
Fri Jun 27 15:50:18 UTC 2003
Hi Ned, thanks for the education.
I've been banging my head on this myself a few days ago.
I had parsed a text file, extracted the parts I wanted. Created a new
file. Emailed myself the fileout of the code and the created file so
that I could continue working at home.
It didn't work. Ugh.
At work I use WinXP at home Gentoo Linux.
Ned Konz wrote:
>> On Friday 27 June 2003 01:03 am, Avi Bryant wrote:
[snip]
>
> What's wrong with the withSqueakLineEndings code that I put in?
I think I'll need to learn to avail myself to this as I regularly want
to parse and play with text files.
>>1. One nice thing about DVS is it uses normal chunk format for its
>>fileouts. This means you can file it in without using DVS. This
>>also means that people *are going to* file in DVS packages without
>>DVS, and those packages *are going to* have line-endings other than
>>CR. That means you will end up with LFs inside your source, which
>>I assume was at the root of Tim's problem.
>
>>Ultimately (and this is the bad news), the line ending issues in
>>DVS are a result of a fundamentally flawed goal - to be compatible
>>both with CVS and with Squeak chunk format.
>
> We can do this in two ways:
>
> * make DVS proactive. In its header we can put code that sniffs if it
> is being loaded using DVS. If not, we can
>
> * make Squeak more robust loading files. I'd vote for this one.
> There's no reason why we can't translate any of:
>
> CR
> CRLF
> CRCRLF
> CRLFLF
>
> into a single native CR on file-in.
I would like to see Squeak more robust loading files including those not
being filed in but using one of the FileStream classes. I could be naive
in my understanding and if so I accept enlightenment.
It seems from browsing that the CrLfFileStream does much of that. The
problem I was having is that I was using
FileList2>>modalFileSelectorForSuffixes: which returns a
StandardFileStream.
And as such my text file on Linux was full of 'lf's and the #nextLine
was not working.
I guess this is where I could have used withSqueakLineEndings on the
fileContents.
If I am off base here please correct me.
Thanks for any wisdom offered.
Jimmie Houchin
More information about the Squeak-dev
mailing list
|