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

Re: Prevent users from commiting in tags/

From: Matthias Fechner <idefix_at_fechner.net>
Date: Fri, 12 Jun 2009 10:23:57 +0200

Hi,

Andrey Repin schrieb:
> Why you need hooks?
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1584335
> Isn't it what you need?

thanks for all your suggestions.
I use now a combination of both.
Only some users are allowed to copy to tags/ and updates to the
directory are denied by the following code in my pre-commit hook:
# Do not allow updates in tags
UPDATES_IN_TAGS=`$SVNLOOK changed -t "$TXN" "$REPOS" | $GREP '^U' | grep
-i 'tags/'`
if [ "$UPDATES_IN_TAGS" != "" ]; then
        echo 1>&2
        echo "Updates in tags/ are not allowed." 1>&2
        echo "Create a new tag for it." 1>&2
        exit 1
fi

Best regards
Matthias

-- 
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2361538
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-12 10:25:10 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.