You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Matt England <me...@mengland.net> on 2006/03/13 00:52:26 UTC
Standardize on ASCII type: dos2unix pre-commit hook?
The various repos I administer finds users putting different text/ASCII
types (dos and unix, maybe some old mac) in the text-file content. This
screws up the diff comparisons, merges, and other things.
I'd like to auto-force a standard unix text across certain repos (if not
all of them). My current thinking is to run a dos2unix/mac2unix pre-commit
hook. Is this a good/best way to go?
I assume I am not the first one to experience and address this
problem. I'm looking to learn from others. Suggestions/background/advice?
-Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Fwd: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Emmanuel Blot <ma...@gmail.com>.
---------- Forwarded message ----------
From: Emmanuel Blot <ma...@gmail.com>
Date: Mar 13, 2006 2:03 AM
Subject: Re: Standardize on ASCII type: dos2unix pre-commit hook?
To: Matthew England <me...@mengland.net>
> I'd like to auto-force a standard unix text across certain repos (if not
> all of them). My current thinking is to run a dos2unix/mac2unix pre-commit
> hook. Is this a good/best way to go?
AFAIK, you should not attempt to change the content of an ongoing
transaction within a pre-commit hook, so this means you're not allowed
to change the content of a file, such as translating the LF ending
on-the-fly.
Can't you use the svn:eol-style propery combined with the
"auto-properties" feature instead ?
--
Manu
--
Manu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Emmanuel Blot <ma...@gmail.com>.
> 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?
I don't think so, but I might be wrong.
> If it's a client-side setting, then it's not nearly as useful to me. This
> goes back to the general issue I have with subversion where I can't manage
> the properties of clients from a single point (namely the server), which
> would be much more powerful, in my opinion. Is there any move afoot for
> future subversion changes to support a single-point-of-client control?
I would not like, as a user, that the revision control system changes
the content of the files I submit (commit) with some magic rules I
simply ignore.
I found easier to define the auto-properties file and to ask all the
users entering the project to download and install the file.
Re: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Ryan Schmidt <su...@ryandesign.com>.
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
Re: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Matt England <me...@mengland.net>.
At 3/13/2006 10:09 AM, Ryan Schmidt wrote:
>On Mar 13, 2006, at 16:46, 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?
Also, the svn book says:
"
enable-auto-props
This instructs Subversion to automatically set properties on newly added or
imported files. The default value is no, so set this to yes to enable
Auto-props. The auto-props section of this file specifies which properties
are to be set on which files.
"
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?
I'm still feeling my way through this process, so my apologies if I'm
asking ignorant questions.
-Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 13, 2006, at 16:46, 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?
>
> If it's a client-side setting, then it's not nearly as useful to
> me. This goes back to the general issue I have with subversion
> where I can't manage the properties of clients from a single point
> (namely the server), which would be much more powerful, in my
> opinion. Is there any move afoot for future subversion changes to
> support a single-point-of-client control?
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Server-driven configuration control?
Posted by Nico Kadel-Garcia <nk...@comcast.net>.
----- Original Message -----
From: "Matt England" <me...@mengland.net>
To: "SVN Users email list" <us...@subversion.tigris.org>
Cc: <me...@mengland.net>
Sent: Tuesday, March 14, 2006 8:13 PM
Subject: Server-driven configuration control?
>I would like to see the Subversion system one day support server-side
>configuration management of repo-wide activities. ie, I don't want to have
>to force, manual, client-side changes (as per things like the "Standardize
>on ASCII type: dos2unix pre-commit hook?" thread started here:
><http://svn.haxx.se/users/archive-2006-03/0516.shtml>, some text of which
>is commented below) in order to enforce repo-wide policies like standard
>ASCII formats, etc.
>
> Is this is Subversions future, however far out it may be?
>
> -Matt
Matt, there are already a small stack of "hooks" published for exactly this
sort of use. They're available at
http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Server-driven configuration control?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 15, 2006, at 02:13, Matt England wrote:
> I would like to see the Subversion system one day support server-
> side configuration management of repo-wide activities. ie, I don't
> want to have to force, manual, client-side changes (as per things
> like the "Standardize on ASCII type: dos2unix pre-commit hook?"
> thread started here: <http://svn.haxx.se/users/
> archive-2006-03/0516.shtml>, some text of which is commented below)
> in order to enforce repo-wide policies like standard ASCII formats,
> etc.
>
> Is this is Subversions future, however far out it may be?
This seems to be the feature request:
http://subversion.tigris.org/issues/show_bug.cgi?id=1974
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Server-driven configuration control?
Posted by Matt England <me...@mengland.net>.
I would like to see the Subversion system one day support server-side
configuration management of repo-wide activities. ie, I don't want to have
to force, manual, client-side changes (as per things like the "Standardize
on ASCII type: dos2unix pre-commit hook?" thread started here:
<http://svn.haxx.se/users/archive-2006-03/0516.shtml>, some text of which
is commented below) in order to enforce repo-wide policies like standard
ASCII formats, etc.
Is this is Subversions future, however far out it may be?
-Matt
At 3/14/2006 04:55 AM, Ryan Schmidt wrote:
>On Mar 13, 2006, at 20:24, Res Pons wrote:
>
>>I hope soon there's a server side control feature for this.
>>Setting auto props per user just doesn't make any sense to me and
>>if user set their own, wouldn't there be a conflict? I tried to
>>implement this feature on my server and I was told it yet doesn't
>>exist or not possible.
>
>What do you mean, "if user set their own, wouldn't there be a conflict"?
>
>I would suggest that you have a config file which specifies the
>automatic properties you want. Distribute this to all users. Then
>have a pre-commit hook which rejects files which do not have the
>required properties. Then there can be no problem.
>
>Well, of course there can be a problem of a user needing to work with
>two different repositories which have two different auto-props
>policies. That's not handled well right now. Sure, you can tell the
>svn command to use a different config file, but it's tedious and
>error-prone to specify that for each and every svn command.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 13, 2006, at 20:24, Res Pons wrote:
> I hope soon there's a server side control feature for this.
> Setting auto props per user just doesn't make any sense to me and
> if user set their own, wouldn't there be a conflict? I tried to
> implement this feature on my server and I was told it yet doesn't
> exist or not possible.
What do you mean, "if user set their own, wouldn't there be a conflict"?
I would suggest that you have a config file which specifies the
automatic properties you want. Distribute this to all users. Then
have a pre-commit hook which rejects files which do not have the
required properties. Then there can be no problem.
Well, of course there can be a problem of a user needing to work with
two different repositories which have two different auto-props
policies. That's not handled well right now. Sure, you can tell the
svn command to use a different config file, but it's tedious and
error-prone to specify that for each and every svn command.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Daniel Serodio <da...@xxx.com.br>.
Then let's vote for (or better yet, implement) this bug!
http://subversion.tigris.org/issues/show_bug.cgi?id=1974
HTH,
Daniel Serodio
Res Pons wrote:
> I hope soon there's a server side control feature for this. Setting
> auto props per user just doesn't make any sense to me and if user set
> their own, wouldn't there be a conflict? I tried to implement this
> feature on my server and I was told it yet doesn't exist or not possible.
>
> ----Original Message Follows----
> From: Matt England <me...@mengland.net>
> Subject: RE: Standardize on ASCII type: dos2unix pre-commit hook?
>
> 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?
>
> If it's a client-side setting, then it's not nearly as useful to me.
> This goes back to the general issue I have with subversion where I
> can't manage the properties of clients from a single point (namely the
> server), which would be much more powerful, in my opinion. Is there
> any move afoot for future subversion changes to support a
> single-point-of-client control?
>
> -Matt
>
>
> At 3/12/2006 07:04 PM, Tony Morris wrote:
>> I am by no means an expert, but I have used the svn:eol-style property.
>> You can set it to apply to commits of specific file types in the
>> Subversion
>> config file as an 'auto-prop'.
>>
>> Tony Morris
>> http://tmorris.net/
>>
>>
>> -----Original Message-----
>> From: Matt England [mailto:mengland@mengland.net]
>> Sent: Monday, March 13, 2006 10:52 AM
>> To: SVN Users email list
>> Cc: mengland@mengland.net
>> Subject: Standardize on ASCII type: dos2unix pre-commit hook?
>>
>> The various repos I administer finds users putting different text/ASCII
>> types (dos and unix, maybe some old mac) in the text-file content. This
>> screws up the diff comparisons, merges, and other things.
>>
>> I'd like to auto-force a standard unix text across certain repos (if not
>> all of them). My current thinking is to run a dos2unix/mac2unix
>> pre-commit
>> hook. Is this a good/best way to go?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Res Pons <po...@hotmail.com>.
I hope soon there's a server side control feature for this. Setting auto
props per user just doesn't make any sense to me and if user set their own,
wouldn't there be a conflict? I tried to implement this feature on my
server and I was told it yet doesn't exist or not possible.
----Original Message Follows----
From: Matt England <me...@mengland.net>
Reply-To: "Matthew England" <me...@mengland.net>
To: "Tony Morris" <tm...@tmorris.net>
CC: "'Matthew England'" <me...@mengland.net>, "'SVN Users email list'"
<us...@subversion.tigris.org>
Subject: RE: Standardize on ASCII type: dos2unix pre-commit hook?
Date: Mon, 13 Mar 2006 09:46:54 -0600
MIME-Version: 1.0
X-Sender: mail.core.com:mme@127.0.0.1
Received: from tigris.org ([64.125.133.100]) by
bay0-mc11-f5.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 13
Mar 2006 07:59:33 -0800
Received: (qmail 6209 invoked by uid 5000); 13 Mar 2006 15:47:24 -0000
Received: (qmail 6184 invoked from network); 13 Mar 2006 15:47:20 -0000
X-Message-Info: JGTYoYF78jFJA+6l6KVpL3VF28Gu+acEWFcqZBYkPd4=
Mailing-List: contact users-help@subversion.tigris.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
list-help: <ma...@subversion.tigris.org>
list-unsubscribe: <ma...@subversion.tigris.org>
list-post: <ma...@subversion.tigris.org>
Delivered-To: mailing list users@subversion.tigris.org
X-Sasl-enc: 5C/nk0/2op07C8SObRxAShq7m2MPln7v5G+OywBbP+lt 1142264829
X-Mailer: QUALCOMM Windows Eudora Version 6.1.2.0
References: <6....@127.0.0.1>
<20...@vscan02.westnet.com.au>
Return-Path: users-return-46369-pons32=hotmail.com@subversion.tigris.org
X-OriginalArrivalTime: 13 Mar 2006 15:59:34.0647 (UTC)
FILETIME=[1F677070:01C646B7]
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?
If it's a client-side setting, then it's not nearly as useful to me. This
goes back to the general issue I have with subversion where I can't manage
the properties of clients from a single point (namely the server), which
would be much more powerful, in my opinion. Is there any move afoot for
future subversion changes to support a single-point-of-client control?
-Matt
At 3/12/2006 07:04 PM, Tony Morris wrote:
>I am by no means an expert, but I have used the svn:eol-style property.
>You can set it to apply to commits of specific file types in the Subversion
>config file as an 'auto-prop'.
>
>Tony Morris
>http://tmorris.net/
>
>
>-----Original Message-----
>From: Matt England [mailto:mengland@mengland.net]
>Sent: Monday, March 13, 2006 10:52 AM
>To: SVN Users email list
>Cc: mengland@mengland.net
>Subject: Standardize on ASCII type: dos2unix pre-commit hook?
>
>The various repos I administer finds users putting different text/ASCII
>types (dos and unix, maybe some old mac) in the text-file content. This
>screws up the diff comparisons, merges, and other things.
>
>I'd like to auto-force a standard unix text across certain repos (if not
>all of them). My current thinking is to run a dos2unix/mac2unix pre-commit
>hook. Is this a good/best way to go?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Matt England <me...@mengland.net>.
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?
If it's a client-side setting, then it's not nearly as useful to me. This
goes back to the general issue I have with subversion where I can't manage
the properties of clients from a single point (namely the server), which
would be much more powerful, in my opinion. Is there any move afoot for
future subversion changes to support a single-point-of-client control?
-Matt
At 3/12/2006 07:04 PM, Tony Morris wrote:
>I am by no means an expert, but I have used the svn:eol-style property.
>You can set it to apply to commits of specific file types in the Subversion
>config file as an 'auto-prop'.
>
>Tony Morris
>http://tmorris.net/
>
>
>-----Original Message-----
>From: Matt England [mailto:mengland@mengland.net]
>Sent: Monday, March 13, 2006 10:52 AM
>To: SVN Users email list
>Cc: mengland@mengland.net
>Subject: Standardize on ASCII type: dos2unix pre-commit hook?
>
>The various repos I administer finds users putting different text/ASCII
>types (dos and unix, maybe some old mac) in the text-file content. This
>screws up the diff comparisons, merges, and other things.
>
>I'd like to auto-force a standard unix text across certain repos (if not
>all of them). My current thinking is to run a dos2unix/mac2unix pre-commit
>hook. Is this a good/best way to go?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Standardize on ASCII type: dos2unix pre-commit hook?
Posted by Tony Morris <tm...@tmorris.net>.
I am by no means an expert, but I have used the svn:eol-style property.
You can set it to apply to commits of specific file types in the Subversion
config file as an 'auto-prop'.
Tony Morris
http://tmorris.net/
-----Original Message-----
From: Matt England [mailto:mengland@mengland.net]
Sent: Monday, March 13, 2006 10:52 AM
To: SVN Users email list
Cc: mengland@mengland.net
Subject: Standardize on ASCII type: dos2unix pre-commit hook?
The various repos I administer finds users putting different text/ASCII
types (dos and unix, maybe some old mac) in the text-file content. This
screws up the diff comparisons, merges, and other things.
I'd like to auto-force a standard unix text across certain repos (if not
all of them). My current thinking is to run a dos2unix/mac2unix pre-commit
hook. Is this a good/best way to go?
I assume I am not the first one to experience and address this
problem. I'm looking to learn from others. Suggestions/background/advice?
-Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org