"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
> 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
> prop=$(svnlook propget -t $TXN $REPOS svn:keywords $path 2>
> if [ ! $prop ]
> print -u2 "No property svn:keywords is set for $path!\n"
> print -u2 "Keywords property is $prop"
> 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
> the server and not on the client who has the working directory
> I can't do an "svn propset". But, neither svnadmin nor svnlook allow me
> a property.
> I'm pretty new to Subversion and might be missing something fairly
> 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: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Mar 31 20:02:48 2005