Subversion RSS feeds in C#
After reading Rob Chartier's post and the comments I have written a simple plugin application to hook into the 'post-commit' event of a subversion source code repository updates.
Before I go any further, let me qualify what environment I have written this for:
- Windows
- .Net 1.1
- Subversion 1.3.0 (may work on earlier versions)
You can get the source code here : http://savage.org.za/downloads/svnrsscode.zip and the binaries here http://savage.org.za/downloads/svnrssbinary.zip
To install just copy the binary files to the 'hooks' directory of your subversion repository (/path/to/my/repository/hooks) and modify the values in the config file to reflect your environment (path and url).
The RSS feed is created by the Rss.Net library from http://www.rssdotnet.com.
To add your own functions to the post commit:
- Create a new .net class library
- Add a reference to SvnHook.dll
- Add a class that implements the ISvnPostCommit interface and add your function code.
- Compile the dll and drop the binary into the hooks directory
public interface ISvnPostCommit
{
void Commit(object sender,PostCommitEventArgs args);
}
enjoy.