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

Re: Idea for dealing with text-file line endings

From: Jim Fulton <jim_at_zope.com>
Date: 2004-04-29 23:50:49 CEST

Ben Collins-Sussman wrote:
> On Thu, 2004-04-29 at 16:09, Jim Fulton wrote:
>
>
>> [auto-props]
>> * = svn:eol-style=native
>
>
> This is bad, bad, bad. You're basically giving the SVN client
> permission to change bytes within binary files. Get ready for corrupted
> binary files!

No, because subversion prevents setting this property for binary files.

>
>
>>The only alternative I see is to write a post-commit script that sets
>>properties. This is what I planned to do until someone thought of this
>>idea.
>
>
> Instead, set a pre-commit script which examines newly added files that
> match a certain set of extensions (.txt, .c, .h, .java, etc.) If
> somebody forgets to set the 'native' eol property, then bounce the
> commit.

So, I assume you intend that people would need to manage a set
of [auto-props] rules, and that this would be something to show bugs
in thier rules. (Surely, you don't expect people manually set
svn:eol-style on every text file.) As I mentioned before, I consider making
people maintain [auto-props] to be burdensome. It wouldn't be so bad of they
could have a rule that says: "if the file is a text file, set the
svn:eol-style to native", which is the rule we *really* want.
File name rules aren't really even expressive enough.

I also don't like the idea of vetoing commits based on guessed file types
on the server. Whatever is done automatically, should be overridable by
the user.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 29 23:51:20 2004

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.