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

Re: Svn:externals do not set properly despite affirmative confirmation [Linux]

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Wed, 21 Oct 2009 21:29:11 -0500

On Oct 21, 2009, at 20:06, Ted Sheibar wrote:

> 1) Loops through each repository (there are 12) and detect (with svn
> pg) if the repo has the svn:externals property set

Note that svn:externals could be set anywhere in a repository, not
just on its root. You're only checking the root.

> Only 1 hook in use: Pre-revprop-change -- contains the following:
>
> REPOS="$1"
> REV="$2"
> USER="$3"
> PROPNAME="$4"
> ACTION="$5"
>
> if [ "$ACTION" == "M" -a "$PROPNAME" == "svn:log" ]; then exit 0; fi
>
> if [ "$ACTION" == "A" -o "$ACTION" == "M" ]; then
> if [ "$PROPNAME" == "svn:externals" ]; then
> if [ "$USER" == "me" ]; then
> exit 0;
> else
> echo "User $USER is not authorized to add
> svn:externals."
> exit 1;
> fi
> fi
> fi
>
> echo "$USER: Please contact your SVN Administrator ($REV, $PROPNAME,
> $ACTION)" >&2
>
> exit 1

You can delete your entire pre-revprop-change hook, since as discussed
in the previous mail, svn:externals is a versioned property, not a
revision property. If your goal is to prevent people from adding
svn:externals, you'll need to write a pre-commit hook which uses
"svnlook dirs-changed" to see what directories changed, and see if any
of them has svn:externals set in the transaction but did not before.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410044

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-22 04:30:19 CEST

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.