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

Re: Can subversion be set up to modify files on commit?

From: Aleksey Nogin <aleksey_at_nogin.org>
Date: 2005-02-04 23:23:18 CET

On 04.02.2005 14:03, Ben Collins-Sussman wrote:

>> Basically, we use the commitinfo feature of CVS (an ability to run a
>> script _before_ commit while having access to the files being
>> committed) to _modify_ certain files before they are committed. Is
>> this sort of thing possible with subversion?
> No no no no no no no no no no. :-)
> See the giant warning box here:
> http://svnbook.red-bean.com/en/1.1/ch05s02.html#svn-ch-5-sect-2.1

Yes, I was looking at that one. Now, the question is - should this be
considered a _bug_ (or at least a missing feature)? Shouldn't it be
possible to modify things from the pre-commit script and have the server
tell the client about it? I would imagine this would solve a large
number of issues (such as Issue 1974). Should I file this as an RFE, or
is there some reason why this can not be done?

>> P.P.S. Basically, we use this to enforce a few formatting conventions
>> on the files - and just rejecting ill-formatted files would not work
>> because the users are too lazy
> Pre-commit hooks are perfect for enforcing by rejecting commits that
> don't conform. But they cannot change the data -- only validate and/or
> reject.

Well, short of writing a wrapper script for svn commit, is there some
way to make sure that commits are always handled by some script that
_can_ modify data?

P.S. As I already said, with CVS there is the same exact issue - if a
server modifies something, then the client would not know about it. But
at least they seem to agree it's a bug, and not just a "never do this,
even if you really want to" warning!

Aleksey Nogin
Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Feb 4 23:25:40 2005

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.