How can I add a single post-commit for multiple repositories in subversion hooks

We have a subversion setup like /var/svn/repoA, /var/svn/repoB, /var/svn/repoC etc. We use Redmine for project management.

To automate some tasks like updating Redmine projects, we are using subversion post-commit hook.

As we have multiple repositories for multiple projects, when we need to implement a common hook for all projects in redmine, we edit all post-commit hooks inside multiple repositories. Definitely this is getting annoying and problematic.

I am trying to figure out if it is possible (and if so, how) to use a single post-commit hook for all the repositories.


-------------Problems Reply------------

use symbolic links to a single post-commit hook

We had a similar problem, the solution is ALMOST as good as having a single post-commit hook script. I wrote ONE single script that does all the Redmine integration stuff. This script takes as input the project identifier in Redmine. All we have to do now is to call the integration script from within the post-commit hook script, per repository, passing the Redmine project identifier. So, yes, each repository has to have its own post-commit hook, but is just a one-line call to another script with a parameter.


  • You will still have one post-commit hook per repository. HOWEVER, it's just a one-line script, passing the Redmine project identifier as a parameter. That's not going to change all the time is it?


  • When there's change, you will only change the integration script. You will never touch the post-commit hooks
  • As time goes by, you might find yourself in need to perform different actions in different projects/repositories. That is doable with the presented approach. You don't get that kind of flexibility using the single post-commit hook approach. In the end, that's really why you have the post-commit hook per repository. You might even have a different issue tracker for some repository, right?
Category:svn Views:1 Time:2011-03-18

Related post

  • How can I do a single SVN commit across multiple externals at the command line? 2009-04-20

    This may be impossible, but I'm going to ask anyway. Without going into the details of why it's like this, I have two primary checkouts that I work in, one for the production release branch, and one for trunk. Each of them is a small collection of sv

  • svn commit to multiple repositories 2010-02-10

    I have have a main project I am working on, which has several modules/directories. The main project is bound to local svn repository. however, whenever I do commit, I would like to push some modules/directories to Google code repository as well. Howe

  • How to convert single hg repository to multiple repositories 2011-02-27

    I have a repository with 5 sub-directories. repo/ a/ file-a b/ file-b c/ file-c d/ file-d e/ file-e How can I convert each sub-directory in to different repositories? (Only relevant changesets to the given sub-directory should be converted new reposi

  • SVN - What are all the benefits we have if we commit a huge files list in a single shot rather than multiple commits? 2010-12-13

    I woud like to understand what are all the benefits we have if we commit a huge files list in a single shot rather than multiple commits? --------------Solutions------------- One of the big advantages of Subversion over CVS is its ability to keep rel

  • List all the files checked-in in a single cvs commit 2009-06-30

    Generally,our fixes/patches for any bugs involves changes in multiple files and we will commit all these files in a single shot. In SVN, for each commit (may involve multiple files),it will increment revision number of whole repository by one. So, we

  • JQuery - How to add a single html tag to some html? 2010-05-11

    I want to insert just a single <span> before the text below (right before LINK): <li><a href="">LINK</a></li> So, the above becomes <li><a href=""><span>LINK</a></li> Here is my JQuery Code:

  • Can a Git hook automatically add files to the commit? 2010-07-19

    I'd like to add an automatically generated file to the same commit using a pre- or post-commit hook in Git, dependent on the files that were modified in that commit. How would I go about this? I've tried this as a pre-commit hook, but no luck: #!/bin

  • Tortoise HG - Add a tag on commit 2010-12-22

    At the moment, I only know how to add a tag after a commit. This means that a get a second commit that just contains the tag. Is it possible to add a tag on commit? --------------Solutions------------- No, because a tag is an entry in the .hgtags fil

  • git-svn: Keep single merge commit after svn rebase 2011-03-15

    I am following this pattern to check in my code in feature-branch to Subversion with git-svn: git checkout master git svn rebase git checkout feature-branch git rebase master git checkout master git merge --no-ff feature-branch git commit --amend git

  • Unset all css, and add a single css for custom independent template at drupal 7 2011-05-19

    Ho do you unset all css core, contrib, theme, and then add a single custom CSS file for a single special page--special.tpl.php at drupal 7? I tried using hook_css_alter, but I can not get it to work so far. function mytheme_css_alter(&$css) { $al

  • GIT add vs push vs commit 2011-05-26

    What is the difference between GIT's add vs push vs commit? Just a little confused coming over from SVN, where "update" will 'add' stuff, and commit does a "push" and will 'add' as well yet there are all different functions within GIT. Hoping for som

  • How to add a Single choice list to a custom dialog in android? 2012-02-23

    I would like to add a single choice list to custom dialog I have tried it in different types but I am getting the app crashed with a null pointer error only.I find it can be done only in AlertDialog.Builder format only in many examples.Kindly help me

  • How can I add a single control instance to an ItemsPanelTemplate? 2012-02-27

    In my project, I have an ItemsControl which has as its ItemsPanel template a Grid. I would like to add a single control with this grid, completely independent of the ItemsControl 'Items', which can be accessed in the code-behind. What is the best way

  • How to add a single column php/mysql 2012-03-05

    I'm trying to add a single column in a db query result. I've read about the SUM(col_name) as TOTAL, GROUP BY (col_name2). But is there a way i can only SUM the column without any GROUPing? I a case whereby all col_name2 are all unique. For example...

  • How to add a single site to favourites? 2013-11-12

    The only option available in IE9 is to add all open tabs as a single folder in favourites. I just want to add one single site to my favourites and I have not been able to find the link for the same. The option of adding into a folder doesnt appear wh

  • Can a single solution hold projects from multiple repositories? 2010-06-10

    I've begun setting up SVN repositories to store my code, and am wondering if a single Visual Studio solution can have projects from multiple repositories. I have a shared library with different helper functions, generic custom controls, etc, that are

  • Commit to multiple branches at the same time with git 2010-12-25

    I have two branches A and B in a project that I am working on. B differs from A by a single commit, which is a section of the code completely independent from what I'm working on for the next while (aka, I will have many commits I want to push to bot

  • How to combine multiple Excel files into single Excel workbook with multiple sheets? 2009-06-30

    I need to develop a service (either WCF or Java) that can take multiple single-sheet Excel files and combine them into a single Excel workbook with multiple sheets. The Excel files are actually exported from crystal reports as individual files. Follo

  • Multiple repositories or single repository with branches? 2010-05-04

    I have been working on a project for some time, and it has branched off into several different versions. All versions have some common code base, and each version has specific functionality that is unique, and each version will need to be supported i

Copyright (C), All Rights Reserved.

processed in 0.111 (s). 11 q(s)