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

Re: Setting svn:eol-style

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2003-12-03 21:19:47 CET

"Rusk, Patrick" <PRusk@wellington.com> writes:

> I've just checkout out a bunch of code on a Solaris machine that was
> originally committed from a Windows machine. They've got the wrong line
> endings on Solaris.
>
> I've read the Properties and Best Practices section of the Subversion book
> about the "svn:eol-style" property, and I know that I want to use "native".
> What I don't fully understand is how to apply this.
>
> Do I have to do a "svn propset" on each individual text file in my
> repository?

Yes. 'svn propset -R svn:eol-style native' (it will automatically
skip directories, and just apply the change to files).

> Or is there a way to apply it to the repository as a whole, so that
> it is automatically applied to all text files, but not binary files?

You (and all your developers) could set up auto-props to set the
property on known text-file patterns (*.c, *.h, *.txt, etc.). At
least, I think you can -- I've not gotten around to trying the
auto-props stuff for myself.

> If I have to do it individually to files, is there some way to ensure that
> any text file checked it gets this property set? Otherwise, we're bound to
> forget to set it frequently.

You could write a pre-commit hook in Python which returns error on any
file additions which aren't accompanied by either a "binary" value for
the svn:mime-type property, or "native" for the svn:eol-style property.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 3 23:21:37 2003

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.