You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dyrson Rodrigues <dy...@pbh.gov.br> on 2008/03/11 15:00:52 UTC

Can I have one post-commit script for all my repositories?

I have a post-commit script running fine for one repository. I'd like to have it executing for all my repositories. And I do not want to copy it to all hooks subdirectories(and don't want do create links either). 

I notice the existence of a hooks directory in the root installation directory of subversion. I put the script in this directory expecting that it would run for all repos, but it doesn't. 

So this is my question. Is there a way to have one post-commit script running for all repositories?

Thanks in advance.

Dyrson

Re: Can I have one post-commit script for all my repositories?

Posted by Matt imMute Sickler <im...@msk4.ath.cx>.
Dyrson Rodrigues wrote:
> I have a post-commit script running fine for one repository. I'd like to 
> have it executing for all my repositories. And I do not want to copy it 
> to all hooks subdirectories(and don't want do create links either).
>  
> I notice the existence of a hooks directory in the root installation 
> directory of subversion. I put the script in this directory expecting 
> that it would run for all repos, but it doesn't.
>  
> So this is my question. Is there a way to have one post-commit script 
> running for all repositories?
>  
> Thanks in advance.
>  
> Dyrson

Of course, just put your post-commit hook in, for example, 
/var/svn/hooks/standard-post-commit
Then for each repository ($REPO):
ln -s /var/svn/hooks/standard-post-commit $REPO/hooks/post-commit

Or something like this.

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

RE: RE: Can I have one post-commit script for all my repositories?

Posted by ni...@planet.nl.
You can also skip step 2 and change step 4 to:

Step 4: Link the script in new_repos/hooks/ so it keeps up to date with the master script. (Linux: ln -s <path-to-global_svn_scripts>/<scriptname> <path-to-new-repos/hooks/<script-name>

Hth,

Nick S.


-----Original Message-----
From: Reedick, Andrew [mailto:jr9445@ATT.COM]
Sent: Tue 3/11/2008 16:17
To: Dyrson Rodrigues; users@subversion.tigris.org
Subject:  RE:  Can I have one post-commit script for all my repositories? 
 
Have the commit script in each hook directory call a global script.

 

Step 1:  Create the real scripts in a global dir.   /global_svn_scripts

Step 2:  create a master hooks directory (/master_hooks) containing the
hook scripts (that point to the global dir)  

Step 3:  Create a repos, new_repos

Step 4:  copy master_hooks/*  new_repos/hooks/.

 

 

 

 

From: Dyrson Rodrigues [mailto:dyrson@pbh.gov.br] 
Sent: Tuesday, March 11, 2008 11:01 AM
To: users@subversion.tigris.org
Subject: Can I have one post-commit script for all my repositories? 

 

I have a post-commit script running fine for one repository. I'd like to
have it executing for all my repositories. And I do not want to copy it
to all hooks subdirectories(and don't want do create links either). 

 

I notice the existence of a hooks directory in the root installation
directory of subversion. I put the script in this directory expecting
that it would run for all repos, but it doesn't. 

 

So this is my question. Is there a way to have one post-commit script
running for all repositories?

 

Thanks in advance.

 

Dyrson


*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA625






RE: Can I have one post-commit script for all my repositories?

Posted by "Reedick, Andrew" <jr...@ATT.COM>.
Have the commit script in each hook directory call a global script.

 

Step 1:  Create the real scripts in a global dir.   /global_svn_scripts

Step 2:  create a master hooks directory (/master_hooks) containing the
hook scripts (that point to the global dir)  

Step 3:  Create a repos, new_repos

Step 4:  copy master_hooks/*  new_repos/hooks/.

 

 

 

 

From: Dyrson Rodrigues [mailto:dyrson@pbh.gov.br] 
Sent: Tuesday, March 11, 2008 11:01 AM
To: users@subversion.tigris.org
Subject: Can I have one post-commit script for all my repositories? 

 

I have a post-commit script running fine for one repository. I'd like to
have it executing for all my repositories. And I do not want to copy it
to all hooks subdirectories(and don't want do create links either). 

 

I notice the existence of a hooks directory in the root installation
directory of subversion. I put the script in this directory expecting
that it would run for all repos, but it doesn't. 

 

So this is my question. Is there a way to have one post-commit script
running for all repositories?

 

Thanks in advance.

 

Dyrson


*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA625



Re: Can I have one post-commit script for all my repositories?

Posted by richard hornsby <ri...@gmail.com>.
Tagged out by the gmail default reply-to-sender...

---------- Forwarded message ----------
From: richard hornsby <ri...@gmail.com>
Date: Tue, Mar 11, 2008 at 12:20 PM
Subject: Re: Re: Can I have one post-commit script for all my repositories?
To: Wouter van der Horst <w....@gmail.com>




On Tue, Mar 11, 2008 at 12:15 PM, Wouter van der Horst <
w.vanderhorst@gmail.com> wrote:

> I solved this by creating symlinks for every hook script individually,
> which solves part of that. Putting a huge warning ("CAUTION SHARED
> SCRIPT")
> in the header solves most of the other part ;)
>

That works.  Maybe the "master" scripts need to be owned by the svn process
with no w bits set so they can't be changed.  Even as root they can't be
modified without changing the permissions.  We can't prevent all stupid,
just throw up hopefully enough barriers they'll (I'll) quit before they (I)
wreck something :)

Re: Re: Can I have one post-commit script for all my repositories?

Posted by Wouter van der Horst <w....@gmail.com>.
I solved this by creating symlinks for every hook script individually,
which solves part of that. Putting a huge warning ("CAUTION SHARED SCRIPT")
in the header solves most of the other part ;)

Wouter

On Tue, Mar 11, 2008 at 5:05 PM, Reedick, Andrew <jr...@att.com> wrote:
>
>
>
>
> Which is great idea right up until someone needs to create a custom hook
> script for one repository and inadvertently affects all repositories.  In my
> experience.  =)
>
>
>
>
>
>
>
>
> From: nicklist@planet.nl [mailto:nicklist@planet.nl]
>  Sent: Tuesday, March 11, 2008 11:45 AM
>  To: users@subversion.tigris.org
>  Subject: RE: Re: Can I have one post-commit script for all my repositories?
>
>
>
>
>
> And another solution would be to symlink the hooks directory, so any file in
> there is in all repositories. Exactly what you want.
>
>  With regards,
>
>  Nick S.
>
>
>
>
> *****
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential, proprietary, and/or
> privileged material. Any review, retransmission, dissemination or other use
> of, or taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from all
> computers. GA625

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

RE: Re: Can I have one post-commit script for all my repositories?

Posted by "Reedick, Andrew" <jr...@ATT.COM>.
Which is great idea right up until someone needs to create a custom hook
script for one repository and inadvertently affects all repositories.
In my experience.  =)

 

 

From: nicklist@planet.nl [mailto:nicklist@planet.nl] 
Sent: Tuesday, March 11, 2008 11:45 AM
To: users@subversion.tigris.org
Subject: RE: Re: Can I have one post-commit script for all my
repositories?

 

 

And another solution would be to symlink the hooks directory, so any
file in there is in all repositories. Exactly what you want.

With regards,

Nick S.





*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA625



RE: Re: Can I have one post-commit script for all my repositories?

Posted by ni...@planet.nl.
And another solution would be to symlink the hooks directory, so any file in there is in all repositories. Exactly what you want.

With regards,

Nick S.

-----Original Message-----
From: Matt imMute Sickler [mailto:immute@msk4.ath.cx]
Sent: Tue 3/11/2008 16:13
To: Dyrson Rodrigues
Cc: users@subversion.tigris.org
Subject:  Re: Can I have one post-commit script for all my repositories?
 
Dyrson Rodrigues wrote:
> I have a post-commit script running fine for one repository. I'd like to 
> have it executing for all my repositories. And I do not want to copy it 
> to all hooks subdirectories(and don't want do create links either).
>  
> I notice the existence of a hooks directory in the root installation 
> directory of subversion. I put the script in this directory expecting 
> that it would run for all repos, but it doesn't.
>  
> So this is my question. Is there a way to have one post-commit script 
> running for all repositories?
>  
> Thanks in advance.
>  
> Dyrson

I see you said you don't want to copy the hook all around, nor do you 
want to use symlinks.  I should mention that that is not possible. 
Using symlinks is by far the easiest solution.

Otherwise, you could write a small wrapper hook that calls the main 
hook, but you would have to copy that around anyway, so it kind of 
defeats the purpose.

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






Re: Can I have one post-commit script for all my repositories?

Posted by Matt imMute Sickler <im...@msk4.ath.cx>.
Dyrson Rodrigues wrote:
> I have a post-commit script running fine for one repository. I'd like to 
> have it executing for all my repositories. And I do not want to copy it 
> to all hooks subdirectories(and don't want do create links either).
>  
> I notice the existence of a hooks directory in the root installation 
> directory of subversion. I put the script in this directory expecting 
> that it would run for all repos, but it doesn't.
>  
> So this is my question. Is there a way to have one post-commit script 
> running for all repositories?
>  
> Thanks in advance.
>  
> Dyrson

I see you said you don't want to copy the hook all around, nor do you 
want to use symlinks.  I should mention that that is not possible. 
Using symlinks is by far the easiest solution.

Otherwise, you could write a small wrapper hook that calls the main 
hook, but you would have to copy that around anyway, so it kind of 
defeats the purpose.

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