You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Greg Thomas <th...@omc.bt.co.uk> on 2005/06/01 16:37:08 UTC

version control of 'hooks' directory

I've been playing around with hooks a lot recently, and thought I'd
better put them under version control.

Is there a reason why I can't make the svn-repos/hooks directory a
working copy of something stored in the svn-repos repository? I've
tried it - it seems to work, despite the horribly recursive nature of
it, but I'm wondering if there's a good reason why I shouldn't be
doing it.

TIA,

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: version control of 'hooks' directory

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Thu, 2 Jun 2005 12:17:43 -0400, David Weintraub <qa...@gmail.com>
wrote:

>You wouldn't get into a situation where an error in the hook script
>keeps you from committing a change in your hook script that would fix
>the error. If you simply changed the hook script without committing
>it, you could still fix the error (and then commit the fixed script to
>your archive).

TBH, I don't see that as a problem. I've a 'live' repository, and a
'test' repository. Both have a 'hooks' directory that are a wc of the
same area in the live repository. I'll develop and test the script in
the test repository, and when I'm happy, commit them. Then I log on to
the live system, and simply 'svn update' the live hooks. If anything
goes wrong, I can just 'svn revert', and revisit them again on the
test repository.

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: version control of 'hooks' directory

Posted by David Weintraub <qa...@gmail.com>.
On 6/1/05, Greg Thomas <th...@omc.bt.co.uk> wrote:
> I've been playing around with hooks a lot recently, and thought I'd
> better put them under version control.
> 
> Is there a reason why I can't make the svn-repos/hooks directory a
> working copy of something stored in the svn-repos repository? I've
> tried it - it seems to work, despite the horribly recursive nature of
> it, but I'm wondering if there's a good reason why I shouldn't be
> doing it.

I believe in version controlling everything, and that would include
scripts that control my version control system.

I recommend that you store the hook scripts in a separate archive with
its own permissions and rules and not part of your main project. That
way, you have better control over access.

You wouldn't get into a situation where an error in the hook script
keeps you from committing a change in your hook script that would fix
the error. If you simply changed the hook script without committing
it, you could still fix the error (and then commit the fixed script to
your archive).

--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: version control of 'hooks' directory

Posted by kf...@collab.net.
Greg Thomas <th...@omc.bt.co.uk> writes:
> >But of course you are writing good hook scripts that explain why things
> >are rejected to STDERR aren't you.  ;)
> 
> For pre-commit, of course. Getting information out of post-commit
> hooks seems to be a bit harder :-(

You've seen http://subversion.tigris.org/issues/show_bug.cgi?id=443
right?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: version control of 'hooks' directory

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Wed, 01 Jun 2005 14:08:20 -0400, Christopher Ness
<ch...@nesser.org> wrote:

>On Wed, 2005-06-01 at 12:15 -0500, kfogel@collab.net wrote:
>> Greg Thomas <th...@omc.bt.co.uk> writes:
>> > Is there a reason why I can't make the svn-repos/hooks directory a
>> > working copy of something stored in the svn-repos repository? 
>> 
>> I don't see any reason why it would be bad, as long as you have proper
>> authz controls.  The security risks are obvious and are yours to
>> analyze :-).

Luckily, we'v got fairly tight control on our repository, so that side
of things is covered.


>If all of your users are trusted though this would be a good way for
>them to see why their commits are being rejected by the server and debug
>their own problems and suggest fixes.
>
>But of course you are writing good hook scripts that explain why things
>are rejected to STDERR aren't you.  ;)

For pre-commit, of course. Getting information out of post-commit
hooks seems to be a bit harder :-(

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: version control of 'hooks' directory

Posted by Christopher Ness <ch...@nesser.org>.
On Wed, 2005-06-01 at 12:15 -0500, kfogel@collab.net wrote:
> Greg Thomas <th...@omc.bt.co.uk> writes:
> > Is there a reason why I can't make the svn-repos/hooks directory a
> > working copy of something stored in the svn-repos repository? I've
> > tried it - it seems to work, despite the horribly recursive nature of
> > it, but I'm wondering if there's a good reason why I shouldn't be
> > doing it.
> 
> I don't see any reason why it would be bad, as long as you have proper
> authz controls.  The security risks are obvious and are yours to
> analyze :-).

If all of your users are trusted though this would be a good way for
them to see why their commits are being rejected by the server and debug
their own problems and suggest fixes.

But of course you are writing good hook scripts that explain why things
are rejected to STDERR aren't you.  ;)

Chris
-- 
Wireless Group,
McMaster University

finger.localdomain
14:06:49 up 3:14, 1 user, load average: 0.09, 0.10, 0.09


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: version control of 'hooks' directory

Posted by kf...@collab.net.
Greg Thomas <th...@omc.bt.co.uk> writes:
> I've been playing around with hooks a lot recently, and thought I'd
> better put them under version control.
> 
> Is there a reason why I can't make the svn-repos/hooks directory a
> working copy of something stored in the svn-repos repository? I've
> tried it - it seems to work, despite the horribly recursive nature of
> it, but I'm wondering if there's a good reason why I shouldn't be
> doing it.

I don't see any reason why it would be bad, as long as you have proper
authz controls.  The security risks are obvious and are yours to
analyze :-).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org