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

Help with Hook Script: Can't lookup file property on the commit transaction

From: David Weintraub <qazwart_at_gmail.com>
Date: 2005-06-15 22:25:53 CEST

I am currently writing a hook script that will do three things:

1). Verify that a particular user has write permission for a file.
2). Verify that a user has permission to add a file or directory to
another directory.
3). Verify that properties are correctly set on a file.

I know that there is already a "commit-access-control.pl" script, but
it can only do the first one of my items. Item #2 is mainly for tags.
I want to be able to easily create tags, but not modify them. I also
want to be able to specify directories where the named user may have
access, but no one else, and I wanted a bit more flexibility working
with groups.

Item #3 is very important to me. We are doing releases of Unix
scripts, and I must be able to specify that the "svn:eol-style"
property on scripts is set to "LF".

I've got the first two features down with no problems, but I am having
terrible trouble with checking the properties of files. For example,
let's say I added a new file called "foo" in my archive, and I set the
property of "svn:eol-style" to "LF". When I do the following command,
I don't get the value of the property:

    $ svnlook propget -t $TXN $REPOS svn:eol-style $FILE

The $TXN and $REPOS is passed to me by the hook. The $FILE name I get
from the "svnlook -t $TXN changed" command.

Is there a problem getting a property from a file via the transaction
number? It appears that Subversion is pulling the current property off
of the file and not the property I'm setting through the transaction.

I don't think it is necessary, but I've attached my "access.pl" script
and my "control-file" so you get an idea what I'm doing.

David Weintraub

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

  • application/octet-stream attachment: access.pl
Received on Wed Jun 15 22:28:34 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.