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

Re: Subversion and samba

From: Ryan Schmidt <subversion-2008a_at_ryandesign.com>
Date: Fri, 14 Mar 2008 14:24:44 -0500

On Mar 14, 2008, at 12:54, Scott Sharkey wrote:

> Paul Koning wrote:
>>>>>>> "Edward" == Edward Harvey <Harvey> writes:
>> Edward> The ^M characters aren't added by svn, they're added by your
>> Edward> text editor. Cross-platform editors such as vi, gvim,
>> emacs,
>> Edward> and xemacs won't do that. You can convert the file formats
>> Edward> with "dos2unix" and "unix2dos"
>> Edward> I never would have guessed, but in the other replies so far,
>> Edward> they say you can also have svn (or tortoise)
>> automatically do
>> Edward> the unix2dos or dos2unix for you. Essentially yes. Take
>> a look at svn:eol-style. As a rule of thumb,
>> this attribute should always be set (usually to "native") for any
>> text
>> file.
>> Values other than "native" are sometimes useful. For example, we
>> have
>> a nightly build machinery setup where a working directory is checked
>> out on a Unix system, then copied or net-mounted from a Windows
>> system
>> that has to build some of the bits. The source files can be
>> "native",
>> because the Windows compilers accept Unix line endings in the
>> sources. But control files, like the "project" files, need Windows
>> line endings. So we set eol-style to CRLF for those.
>
> Paul: is there a way to make "native" the "default", or do we
> literally
> need to enforce it on every file when checked in?

What you do is this:

On every client, edit the Subversion config file and set up your auto-
props to automatically set this property to the desired value on all
files where that would be appropriate.

Then, on the server site, write a pre-commit hook to reject commits
that do not match your policy.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-14 20:26:01 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.