You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Paul Dugas <pa...@dugas.cc> on 2005/09/16 20:21:44 UTC
detect copy in pre-commit hook
I want to enforce rules for access control, naming conventions, and a
branching scheme in a pre-commit hook. I'm hung up trying to figure out
whether additions to /tags are the result of mkdir/add vs. copy.
I found a discussion of doing this from the list back in July but no real
soution for doing it in the pre-commit hook (before the transaction has
completed). Does anybody have a solution for this or is it just not
possible?
Eager for a solution,
Paul
--
Paul Dugas, Computer Engineer Dugas Enterprises, LLC
paul@dugas.cc phone: 404-932-1355 522 Black Canyon Park
http://dugas.cc fax: 866-751-6494 Canton, GA 30114 USA
--
Onsite at GDOT W.Annex 404-463-2860 x199
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: detect copy in pre-commit hook
Posted by Manfred Gruber <gr...@utanet.at>.
Hi !
I have now done a quick-and-dirty shell script for my problem to check that a
commit to a tag dir is only allowed when there are only svn:externals to tag
directories.
maybe it helps you for your problem to fix it.
pre-commit:
${REPOS}/hooks/svn_check_externals.sh "$REPOS" "$TXN" || exit 1
maybe someone can review it if this is all correct.
thanks regards manfred
Am Samstag, 17. September 2005 19:04 schrieb Paul Dugas:
> On Sat, September 17, 2005 11:26 am, Manfred Gruber wrote:
> > maybe we have to look into the svnperms.py scripts to find out how
> > add,update,remove is cheched and then make a new script which handles
> > this things. but i am not good in python. i have too look...
>
> It appears to be that svnperms.py is not diferentiating between mkdir/add
> and copy. They both appear as "add" operations. <sigh>
>
> If this isn't possible with the current implementation, I definitely think
> it should be discussed for future releases. I'm trying to enforce a
> formal configuration management system on top of Subversion using hook
> scripts that enforce a branching and tagging scheme and verify operations
> against an issue tracker. Sone of the requirements I've been given are:
>
> - entries in /tags can only be svn copies of /trunk
> - entries in /branches can only be copies of directories in /tags
>
> I think I need to detect copy vs mkdir/add to enforec these requirements.
>
> Anybody for a fix for this?
Re: detect copy in pre-commit hook
Posted by Paul Dugas <pa...@dugas.cc>.
On Sat, September 17, 2005 11:26 am, Manfred Gruber wrote:
> maybe we have to look into the svnperms.py scripts to find out how
> add,update,remove is cheched and then make a new script which handles
> this things. but i am not good in python. i have too look...
It appears to be that svnperms.py is not diferentiating between mkdir/add
and copy. They both appear as "add" operations. <sigh>
If this isn't possible with the current implementation, I definitely think
it should be discussed for future releases. I'm trying to enforce a
formal configuration management system on top of Subversion using hook
scripts that enforce a branching and tagging scheme and verify operations
against an issue tracker. Sone of the requirements I've been given are:
- entries in /tags can only be svn copies of /trunk
- entries in /branches can only be copies of directories in /tags
I think I need to detect copy vs mkdir/add to enforec these requirements.
Anybody for a fix for this?
--
Paul Dugas, Computer Engineer Dugas Enterprises, LLC
paul@dugas.cc phone: 404-932-1355 522 Black Canyon Park
http://dugas.cc fax: 866-751-6494 Canton, GA 30114 USA
--
Onsite at GDOT W.Annex 404-463-2860 x199
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: detect copy in pre-commit hook
Posted by Manfred Gruber <m....@tirol.com>.
Am Freitag, 16. September 2005 22:21 schrieb Paul Dugas:
> I want to enforce rules for access control, naming conventions, and a
> branching scheme in a pre-commit hook. I'm hung up trying to figure out
> whether additions to /tags are the result of mkdir/add vs. copy.
>
> I found a discussion of doing this from the list back in July but no real
> soution for doing it in the pre-commit hook (before the transaction has
> completed). Does anybody have a solution for this or is it just not
> possible?
hi !
I have the same problem. I wrote a question some mails ago, where I want to
know when there is a copy to a tag directory and then update svn:externals
automatic in a hook script.
I also found no solution for that. maybe someone can help us to find a
solution. thanks a lot if someone has an idea.
maybe we have to look into the svnperms.py scripts to find out how
add,update,remove is cheched and then make a new script which handles this
things. but i am not good in python. i have too look...
regards manfred
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org