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

RE: Setting up the Configuration File

From: Mark Phippard <MarkP_at_softlanding.com>
Date: 2005-03-31 19:48:55 CEST

"Weintraub, David" <David.Weintraub@ilex.com> wrote on 03/31/2005 12:03:24

> Okay, I now know that I can't setup a config file for a server in order
> make sure that the svn:keywords property is set.
> However, I've been playing around with the pre-commit hook, and have
come up
> with the following little tidbit of Kornshell code which looks at all
> files that are being changed, and checks the svn:keywords property to
see if it is set:
> svnlook changed -t $TXN $REPOS | while read type path
> do
> prop=$(svnlook propget -t $TXN $REPOS svn:keywords $path 2>
> if [ ! $prop ]
> then
> print -u2 "No property svn:keywords is set for $path!\n"
> else
> print -u2 "Keywords property is $prop"
> fi
> done
> This means I can prevent someone from committing their changes if the
> keywords property isn't set for a file. I could even give the command
they need to run.
> However, what I'd really like to do is set the svn:keywords property for
> user, but I can't figure out how to do that. The commit script is
running on
> the server and not on the client who has the working directory
checkedout, so
> I can't do an "svn propset". But, neither svnadmin nor svnlook allow me
to set
> a property.
> I'm pretty new to Subversion and might be missing something fairly
obvious. Is
> there a way for the server to "fix" this transaction and set the
> property for the user?

You are not missing anything obvious, you cannot do it. You are not
allowed to modify a transaction in a hook. There should be lots of
flavors of this basic discussion in the archives. It basically comes down
to that the person who does the commit would have an invalid WC after the
commit because their WC would not contain the additional info, and update
would not know they did not have it.


Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 31 20:02:48 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.