Fog Creek Software
Discussion Board




Subversion integration

I wrote some Perl code to integrate the Subversion (http://subversion.tigris.org) version control software with FogBugz.

I would upload the scripts, but there doesn't seem to be an upload feature on this board. Anway, if anyone's interested, simply drop me a mail.

Daniel Gehriger
Wednesday, June 18, 2003

Can you send us the code?  We would like to consider including it in future distributions with your permission.

Michael H. Pryor
Wednesday, June 18, 2003

I posted the zipped hook scripts to http://www.linkcad.com/2003/hooks.zip

Unpack the files to the repository's "hook" directory.

post-commit.bat :

- Batch file required on Windows.
- Simply launches post-commit.pl with the original arguments.
- Assumes that Perl is in the PATH, otherwise you may have to hard-code it into this file.


post-commit.pl :

- The hook Perl script.
- On UNIX, rename to "post-commit" and fix the perl path on the shebang (#!) line.
- Adjust the server variables above the ### comment line.
- Assumes that the SVN executables are in the PATH.
- Checks for the keywords "PR" / "case" / "bug" followed by one or more spaces with and/or an optional dash (-) and a bug id; then posts the necessary information to FogBugz.

Important: the hook script also sets a property "caseids" on the revision, which contains the space separated list of all bug ids (eg. caseids = 111 114 119). This property can later be used for whatever you want. If you don't want this, simply remove the last "if" block in the script.


pre-revprop-change.bat :

Dummy batch file (use a dummy "pre-revprop-change" shell file on UNIX) to enable setting of the "caseids" revision property. Without this, Subversion will not allow the operation, because revprops are not versioned. You may want to add some validation code to this if you are worried about revprops getting overwritten.

Daniel Gehriger
Thursday, June 19, 2003

Add my vote for subversion integration for the next version of FogBugz!

Darren Rush
Wednesday, February 11, 2004

*  Recent Topics

*  Fog Creek Home