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

Re: Standardize on ASCII type: dos2unix pre-commit hook?

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-03-14 12:00:55 CET

On Mar 13, 2006, at 20:53, Matt England wrote:

>>> Does there exist a way to manage this mechanism (svn:eol-style
>>> property, or anything else) such that "ASCII standarizations" will
>>> be made regardless of client-side settings?
>>>
>>> In other words, is this a client-side setting or a server-side
>>> setting? Or is this question pertinent?
>>
>> The settings are client-side. Server-side, you have hooks. So the
>> complete solution is to set up auto-props in the clients' config
>> files, and install a pre-commit hook which prevents people from
>> committing things which do not have the correct properties on the
>> files, possibly referring in the error message to a web page where
>> the user could download a properly-configured config file.
>
> Ok, good.
>
> A few questions about this:
>
> Do I understand correctly that the above procedure requires one and
> only one manual, client-side setting to 'enable-auto-props =
> yes' (not sure of the exact syntax) in the client-side .subversion
> config file?

Well, it's more than one setting that you'll need to make in the
client-side config file:

[miscellany]
enable-auto-props = yes

[auto-props]
*.c = svn:eol-style=LF
*.h = svn:eol-style=LF

Note that you must specify each extension for which you want the EOL
translation to occur. (Do not specify all files by writing "*"
because it will mess up your binary files when EOL translation is
applied to them.)

> What happens for *existing* files in the repo? Do they inherit
> this "auto-props" setting (or is this auto-props setting not a per-
> file thing)? In other words, will the svn:eol-style setting work
> on existing files in my repo?

There are scripts to help you massage existing repo files to match
your new rules.

http://svn.haxx.se/users/archive-2006-01/0485.shtml

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 14 12:02:07 2006

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.