SVN Hooks
Added by Arne De Herdt about 14 years ago
Hello,
I know SVN hooks are possible to have automatic updates in redmine, but I have a more detailed question regarding this:
In our company, we have one server running on the internal ip address 192.168.0.254 that has our SVN repository. A second server on the internal IP address 192.168.0.36 is running our redmine application, and has a repository as well, all be it empty.
The question I have now, is it possible to create SVN hooks on the .254 system to trigger automtic ticket updates in redmine on the .36 system?
Replies (3)
RE: SVN Hooks
-
Added by Sune Westphalen about 14 years ago
Actually the SVN hooks has nothing to do with Redmine!! :)
You configure Redmine with the path to the repository and optionally username/password required for it to access the repository.
This is done automatically if wished, by the provisioned "reposman.rb" script from the extras dir.
This first of all allows repository browsing from Redmine, but also allows Redmine to read the commit messages.
I have no clue when or how Redmine chooses to read the repository, but I know, because I set it up myself two weeks ago, that it is not triggered by an SVN hook.
Cheers! :)
RE: SVN Hooks
-
Added by Arne De Herdt about 14 years ago
thanks for the reply, but not what I'm looking for...
We used to work with Mantis before switching to redmine, and in mantis we had a few SVN hooks that made tickets in mantis automaticly update/close depending on the comment written in the commit log.
I'm looking for a means to do this with redmine as well, with the difference that the redmine application & svn repository are running on different servers.
RE: SVN Hooks
-
Added by Felix Schäfer about 14 years ago
Sune Westphalen wrote:
I have no clue when or how Redmine chooses to read the repository, but I know, because I set it up myself two weeks ago, that it is not triggered by an SVN hook.
Per default redmine is configured to auto-fetch commits, which means redmine updates its view of the repository when you visit a project's repository tab.
For over the wire updates, you can just GET /sys/fetch_changesets
to update all repositories, or GET /sys/fetch_changesets?id=identifier
to update the project with identifier identifier
, combine accordingly with curl or wget or the like in your post-commit and you should be good.
The other options are either through a cronjob on the server redmine is installed on, or a direct (non-http) call to redmine in a post-commit, both options are described in the FAQ (and in a ticket I submitted for a granular local post-commit.).