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

Re: Svn hooks pre-commit - How, for tag operation, check than user make the tag operation in tags directory

From: petermity <6t12-n6js_at_dea.spamcon.org>
Date: Sat, 05 Sep 2009 01:12:14 -0700

Georges Martinez-Valentin <georges.martinez-valentin_at_mgeups.com> wrote:

>Hello,
>
>
>my problem : I want to check than any user make tags in the correct
>directory.
>As we use (tags, trunk & branches) directories for all the project
>developpment, we want than all tags, are made in the "project/tags"
>directory.
>
>I try to use pre-commit hook, but i get 2 problems :
>i don't arrive to determine whether if the current transation is a
>COMMITtransaction or if it is a TAG transaction.
>Any where, using svnlook, i get only the repository path of the project,
>and not the final directory name as "tags".
>
>
>
>Here below more informations about our organization, see below the draft :
>
>/SNVroot---------/Project 1------------/tags
> | /branches
> | /trunk
> |
> |---------/Project 2------------/tags
> | /branches
> | /trunk
> |
> |---------/Project 3------------/tags
> | /branches
> | /trunk
> |
>
>Actually, i use pre-commit hook, for check empty log. And it is running
>well.
>
>
>my questions :
>
>do you think, than i can solve this point, using pre-commit hooks ?
>If yes, how ?
>how can i know if current transaction is a TAG or COMMIT one ?
>
>
>Thanks for your help, and for your nice tool. (old CVS user).
>

In the pre-commit script, use svnlook, like this:

# Get a list of all items in this transaction
TRANSACTIONS=`svnlook changed -t "$TXN" "$REPOS"`

See the book on "svnlook changed".

It still won't tell you when a tag is made - a tag is just a
copy, there's no hook script for that. But at commit time you
can parse the path of each changed item and see if it's in
Project X/tags.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-05 10:13:41 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.