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

Re: converting from SVN to CVS

From: Ryan Schmidt <subversion-2009a_at_ryandesign.com>
Date: Wed, 28 Jan 2009 11:44:58 -0600

On Jan 28, 2009, at 08:37, David Weintraub wrote:

> I'm not a fan of the way ANY revision control system handles the EOL
> problem. In a mixed environment, we had trouble with CVS when people
> edit a file in Notepad, VI on Unix, and Eclipse on various platforms.
> This would also include using Cygwin.
>
> However, I do think this is a glaring weakness in Subversion. Until
> this conversation, I didn't think Subversion even handled EOL issues
> unless you specifically set the svn:eol-style parameter.

You are correct. Subversion does not touch the EOL style of your
files unless you set the svn:eol-style property of the file to some
value.

> It would be nice to be able to configure the server to say

There's no server-side configuration; it's client-side. You can write
pre-commit hooks to enforce a given configuration if desired.

> "If a file
> ends in these suffixes, it is a text file, store the file with Unix
> line endings

Can be accomplished by configuring your client's auto-props to set
svn:eol-style on files of the desired extensions.

> and if you see a lone CR, a CRLF, or a LF, convert it to
> LF.

Subversion will not presume to know what to do with a file with
malformed line endings. You must ensure that the file has consistent
line endings, one way or another, before Subversion will accept it.

> Then, when the client checks out the file, it would convert the
> Unix line endings to whatever it wants.

This is what setting svn:eol-style on a file does.

> Let the server clean up the line endings on commit. Let the client set
> the line endings on checkout. Of course, I'd like to be able to set
> exceptions like Subversion can via its svn:eol-style property, but I'd
> like a sensible default way of handling this. Plus, we must have a
> reasonable way to tell the version control system that something is a
> binary file, so don't munge the line endings.

You can configure sensible defaults in your client's config file.
It's up to you to ensure that you do not set svn:eol-style on binary
files; then, your binary files will not get messed up by errant EOL
conversion.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1064878

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-28 23:28:43 CET

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

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