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

Re: EOL handling policy on the Ruby bindings

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2007-02-17 03:50:13 CET

Hi Joe,

I'm so sorry for my late response again...

In <ae6cb1100702111445h1e90805fte9d7c357d46fea86@mail.gmail.com>
  "Re: EOL handling policy on the Ruby bindings" on Sun, 11 Feb 2007 14:45:25 -0800,
  "Joe Swatosh" <joe.swatosh@gmail.com> wrote:

> subversion repository. I'm not completely certain when we are
> providing information _about_ the data being stored in the repository,
> that we shouldn't report it in a "ruby standard" way. Now whether or
> not diff is data from the repo, or data about the repo is another
> question.

Hmm... Could you give us a example what you worry about?
What is the information about the data? EOL style of a file?
If so, we already provide the way: propget("svn:eol-style",
file_name).

> > * Don't use binary mode for writing and/or reading from/to
> > file in tests except translated_file related methods
> > tests.
>
> Okay. Although from the first paragraph it would seem more consistent
> to use binary mode every where in the tests when reading or writing
> files. Near as I can tell, all binary means in ruby is that the line
> ending translation is suppressed. If we changed all the file reads
> and writes to binary in the tests we wouldn't need any sort of line
> normalization.
>
> I'm not really advocating using binary mode everywhere, but it seems
> to me it might be a reasonable choice if we want to avoid these
> issues.

I think we should write tests to actively find bugs and
should not change tests to pass easily. I think Rubyists on
Windows normally use test mode to read/write from/to
files. So, we should use test mode in tests.

> > * Convert "\n" in a sample source to system EOL for
> > generating expected result from Subversion if it's
> > needed. So, I want to use normalize_line_break like
> > method:
> >
> > def to_system_eol(str)
> > temp = Tempfile("ruby-svn")
> > temp.print(str)
> > temp.rewind
> > temp.binmode
> > temp.read
> > end
>
> I don't see any particular advantage to using the file system to
> convert the line endings over the existing normalize_line_break
> method.

What we want to do by normalize_line_break method is
converting "\n" to the EOL character on the system. I think
this implementation will describe this reason rather than
current normalize_line_break implementation.

# It's better that I make a build system on Windows but it's
# difficult for me...

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 17 03:50:35 2007

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