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

Why not repair native svn:eol-style?

From: Blair Zajac <blair_at_orcaware.com>
Date: 2002-08-02 05:49:54 CEST

In this snippet of code in libsvn_wc/translate.c, for a CR, CRLF or LF
svn:eol-style, the file is repaired (the fourth argument to
svn_wc_copy_and_translate), which I'm assuming means replace any
occurrence of CR, CRLF or LF with the specified eol-style.

      if (style == svn_wc__eol_style_fixed)
        {
          SVN_ERR (svn_wc_copy_and_translate (vfile,
                                              tmp_vfile,
                                              eol,
                                              TRUE,
                                              keywords,
                                              FALSE,
                                              pool));
        }
      else if (style == svn_wc__eol_style_native)
        {
          SVN_ERR (svn_wc_copy_and_translate (vfile,
                                              tmp_vfile,
                                              SVN_WC__DEFAULT_EOL_MARKER,
                                              FALSE,
                                              keywords,
                                              FALSE,
                                              pool));
        }
      else if (style == svn_wc__eol_style_none)
        {
          SVN_ERR (svn_wc_copy_and_translate (vfile,
                                              tmp_vfile,
                                              NULL,
                                              FALSE,
                                              keywords,
                                              FALSE,
                                              pool));

Why isn't this done for the native style? I don't see any need for it.
Clearly the flag `repair' is needed to leave files alone that do not
specify a eol-style and need translation done for keywords.

For the system running svn, the native style is in effect a constant, so
it would make sense for it to repair files also.

I'm asking this because I'm using svn_load_dirs.pl to load Windows files
on a Unix platform and setting svn:eol-style to native. After copying
a newer updated file over an older file already existing in the repository
that has svn:eol-style set to native, the svn commit fails, because the
new file is LF and the existing file has CRLF.

Best,
Blair

-- 
Blair Zajac <blair@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 2 05:50:27 2002

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.