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

Re: Commit hook and changed properties

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-10-16 22:14:44 CEST

On Oct 16, 2007, at 12:32, Bicking, David (HHoldings, IT) wrote:

> I spent some time working with svnlook and a pre-commit hook batch
> file
> looking for a way to identify changed properties. I failed. Rather
> than waste more time, I am here to ask for a bit of help. I want to
> identify properties by name that changed in value (or were added)
> during
> the current commit transaction. I will then take this information and
> determine if the person who is committing has the right to do so.
>
> The pre-commit hook should be the place for the svnlook. The problem
> is, the start-commit hook is where I figure out who is doing it.
> Once I
> figure out how to get the list of changed properties, I'll next
> need to
> communicate that to the next event. I could use help with that, too.

Since the start-commit is not given any of the changes of the commit,
and you need the changes of the commit to see the properties, you'll
need to do all your tasks in the pre-commit hook, not the start-
commit hook.

It doesn't seem to be easy to see the property changes. This might help:

svnlook diff $REPO -t $TXN | sed -n -e 's/^Property changes on: //p' -
e 's/^Name: / /p'

It should give you output for example like this:

bar
  svn:keywords
foo
  svn:eol-style
  svn:mime-type

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 16 22:17:22 2007

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.