[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r11768 - trunk/subversion/tests/clients/cmdline

From: <kfogel_at_collab.net>
Date: 2004-11-08 17:15:20 CET

Jani Averbach <jaa@jaa.iki.fi> writes:
> > This was a bit surprising to me... Why wouldn't one open a text base
> > file as binary in every case? What bad effect was it having?
> I have the 'to be expected' keyword strings and keyword stubs written
> as: '$URL:: ..... \n' and python writes them to the disk with "\r\n"
> line endings on Windows. If I read those strings back to python on
> text mode, the line ends are exactly '\n' (which will match my test
> strings). If I read them as binary (rb), the string will contain
> "\r\n" which won't match with '\n' (extra '\r'). The
> fixed_keyword_test file doesn't use svn:eol-style=native, so the text
> base is indeed in '\r\n' mode.
> It is fun, isn't it?

Eeuww, yes :-).

So it would be better if could have the strings in the source code
contain the correct line endings, the ones that will be written to out
the text-bases, so that reading the text-base in binary mode results
in the correct strings... But I'm not sure how to do that. In any
case, at least a comment near the open() call would be good, to
explain things to a confused reader.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 8 19:10:43 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.