You can use this script as post-commit hook of your svn repo, and it'll announce each commit as new topic on selected boards.
Tested to be compatible with Simple Machines Forum 2.0.x
The arguments are the default arguments accepted by svn post-commit hook:
./svn-smf-hook.py /absolute/path/to/your/repo revision
Working like a charm.
This script is continously developed, so be sure to check back for updated versions!
All that's needed to run this script is Python 2.6 (or newer) and subversion. No other external dependencies.
Python 3 is not supported atm, though it'd be probably easy to convert the script with 2to3 tool.
Example post-commit file
#!/bin/sh REPO=/aboslute/path/to/your/repo /usr/bin/env python $REPO/hooks/svn-smf-hook.py $1 $2
Or if you want it to be asynchronous (so the commit operation will not have to wait till posting ends):
#!/bin/sh REPO=/aboslute/path/to/your/repo /usr/bin/env python $REPO/hooks/svn-smf-hook.py $1 $2 &
Before you deploy this as hook, make sure to properly configure it in svn-smf-hook.conf file. Config options are documented in conf file.
Integration with Project Management Systems
With PMS integration enabled, the revision number, changed files and all ticket references in commit message (for example: ticket #1234) will be converted into links to their PMS pages.
Supported Project Management Systems and corresponding config values
|PMS value||what PMS_URL should point to||Example|
|'trac'||Root trac address||PMS_URL = 'http://trac.myproject.net'|
|'redmine'||Root of the project||PMS_URL = 'http://redmine.myproject.org/projects/fooproject'|
Note about post-commit hooks
Even though this script features PMS integration, it does not work as post-commit hook refreshing repo status in PMS. To have your tickets in PMS updated on commit, use the PMS svn hook together with this script.
Personally, I use this Trac hook, and I find it working great. You can even close tickets via commit messages with it.
Integration with other Project Management Systems?
Please fill an issue with request, and I'll probably make it happen
Pull requests are also welcome.
Example forum post
The post produced by this hook will look roughly like this:
user_56 made revision 12185 changing the following files:
with the message:
The idea for this hook came from similiar hook for another forum software, by [FH]ctz.