You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Engebakken Geir <ge...@edb.com> on 2008/10/09 09:44:09 UTC

Common hookscripts for several repositories

Hi,

We are setting up Subversion with several repositories for several development systems, for instance 1 for all our java prosjects and one for all our cobol development ++

We want to implement some initial hookscripts, and I presume that more will come, some functionality in the hookscripts will be common for all repositories, but others will be adapted individually.

To avoid having to maintain many parallell scripts I would like to find a way to, for instance use symbolic links to a common directory for all hook scripts, but then again how would I differentiate between the different repositories? Are there some best practices around for this scenario? Any ideas?


Geir



Re: Common hookscripts for several repositories

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 9, 2008, at 04:44, Engebakken Geir wrote:

> We are setting up Subversion with several repositories for several  
> development systems, for instance 1 for all our java prosjects and  
> one for all our cobol development ++
>
> We want to implement some initial hookscripts, and I presume that  
> more will come, some functionality in the hookscripts will be  
> common for all repositories, but others will be adapted individually.
>
> To avoid having to maintain many parallell scripts I would like to  
> find a way to, for instance use symbolic links to a common  
> directory for all hook scripts,

No problem in doing that; I do that for my repositories' hooks  
directories.

> but then again how would I differentiate between the different  
> repositories? Are there some best practices around for this  
> scenario? Any ideas?

You want to have the same hook scripts for all repositories, but  
still differentiate between the repositories in the hook scripts? I'm  
not sure if there's a way to get the repository name from within a  
hook script. You may have to write individual hook scripts which do  
the things that you want to be unique for each repository, and then  
from those you can call a common script to do the parts you want to  
be the same across all repositories.


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

Re: Common hookscripts for several repositories

Posted by David Weintraub <qa...@gmail.com>.
Okay, never tried using symbolic links for hook scripts, but that
should be possible. I don't think Subversion cares.

As for telling which repository is which, look at the first argument
passed to the hook. That's the repository directory. Otherwise, you
wouldn't be able to use svnlook.

--
David Weintraub
qazwart@gmail.com



On Thu, Oct 9, 2008 at 5:44 AM, Engebakken Geir <ge...@edb.com> wrote:
> Hi,
>
> We are setting up Subversion with several repositories for several
> development systems, for instance 1 for all our java prosjects and one for
> all our cobol development ++
>
> We want to implement some initial hookscripts, and I presume that more will
> come, some functionality in the hookscripts will be common for all
> repositories, but others will be adapted individually.
>
> To avoid having to maintain many parallell scripts I would like to find a
> way to, for instance use symbolic links to a common directory for all hook
> scripts, but then again how would I differentiate between the different
> repositories? Are there some best practices around for this scenario? Any
> ideas?
>
>
> Geir
>
>

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