Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > Re: Svn:externals do not set properly despite affirmative confirmation [Linux]

subversion
Discussion topic

Back to topic list

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

Author ryandesign
Full name Ryan Schmidt
Date 2009-10-21 19:29:19 PDT
Message 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.

« Previous message in topic | 4 of 4 | Next message in topic »

Messages

Show all messages in topic

Svn:externals do not set properly despite affirmative confirmation [Linux] Ted Sheibar <thinkpipes at gmail dot com> Ted Sheibar <thinkpipes at gmail dot com> 2009-10-21 18:06:55 PDT
     Re: Svn:externals do not set properly despite affirmative confirmation [Linux] Daniel Becroft <djcbecroft at gmail dot com> Daniel Becroft <djcbecroft at gmail dot com> 2009-10-21 18:37:57 PDT
         Re: Svn:externals do not set properly despite affirmative confirmation [Linux] ryandesign Ryan Schmidt 2009-10-21 19:24:19 PDT
     Re: Svn:externals do not set properly despite affirmative confirmation [Linux] ryandesign Ryan Schmidt 2009-10-21 19:29:19 PDT
Messages per page: