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

EOL handling policy on the Ruby bindings

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2007-02-09 14:01:52 CET

Hi Joe,

Sorry for my late response. Here are my new idea for handing
EOL:

* Don't modify a result of Subversion. Subversion uses
  system EOL if EOL is needed and this doesn't have any
  relationship with file's EOL. So, I think that we
  shouldn't normalize EOL of a result to "\r\n" or "\n".
  (e.g. svn_diff_file_output_unified2() uses "\r\n" on
   Windows for header:
     --- XXX.old\r\n
     +++ XXX.new\r\n
     ...
   But it uses "\n" on Linux and so on:
     --- XXX.old\n
     +++ XXX.new\n
     ...
  )

* Use "\n" in a sample source for testing.

* Don't use binary mode for writing and/or reading from/to
  file in tests except translated_file related methods
  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

Am I still stupid...?

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 9 14:02:11 2007

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.