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

Re: svn and automatic line ending

From: Karl Berry <karl_at_freefriends.org>
Date: 2005-01-16 00:07:31 CET

Sorry to reply to my own message, but I found two follow-up issues with
omitting the "binary mime type" error.

1) [easy] multi-file adds of mixed binary and text files still fail
after removing that error, because of another check, at the end of that
same function (validate_eol_prop_against_file in
subversion/libsvn_wc/props.c):

  if (err && err->apr_err == SVN_ERR_IO_INCONSISTENT_EOL)
    return svn_error_createf (SVN_ERR_ILLEGAL_TARGET, err,
                              _("File '%s' has inconsistent newlines"), path);

I made this into a do-nothing, and the add then completed ok.

2) [hard] The commit fails, even though the add succeeded:

  svn: File 'whatever' has inconsistent newlines

This is because the eol:line-style property is set to native (as we
asked for in the config file), even though the mime-type is
application/octet-stream.
  Properties on 'whatever':
    svn:mime-type : application/octet-stream
    svn:eol-style : native

If I propdel svn:eol-style, the commit succeeds. But that defeats the
purpose here, which is to make the mixed add+commit "just work".

Writing the code to automatically omit the svn:eol-style setting in this
circumstance is currently beyond me, so I can only hope it will be taken
up by someone else.

Guess I (and all the other developers) are back to specifying a whole
lot of extensions (and names of text files without extensions) -- the
complement of the list I had to specify with cvs. Drat.

Final thought: one other idea occurred to me in the course of this:
allow a mime-type pattern as well as filename patterns for setting
patterns. Then all the problems related to setting eol-style=native by
default go away. As in (not necessarily with this syntax):

  text/* = svn:eol-style=native

That describes exactly the desired behavior. Any chance of that?

Thanks,
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 16 02:52:19 2005

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.