We recently switched to subversion from cvs and after patching together a Bugzilla 3.0.3 install since the debian buzgilla package is currently orphaned, the dev lead stepped into the IT office and informed me that we needed svn + bugzilla integration for checkins. Meh. There’s a nice long howto here that covers everything, almost step by step, but most of it’s manual. If you ignore that it explains how to install everything, the configuration is somewhat short but still involved hacks with email due to the lack of an API in bugzilla that’s widely used.
SCMBug releases however, have debs, the latest being 0.23.4. you can download these and run:
dpkg -i scmbug-server_0.23.4_all.deb scmbug-common_0.23.4_all.deb ; apt-get install -f
I’m sure there’s a cleaner way to do that, but I haven’t stumbled across it yet and that works.
Installation documentation is nested deep in here.
Upon scmbug_daemon starting I saw:
** Scmbug error 77: The userlist mappings are enabled, but no mappings are configured.
My bugzilla install is currently in /usr/local/bugzilla due to the lack of a package, so I went in there and grabbed the corresponding information from localconfig to update /etc/scmbug/daemon.conf including database information (I keep my mysql databases consolidated in production), and made a point to update installation_directory to ‘/usr/local/bugzilla’.
I also enabled the mapping_regexes section (enabled =>1) and modified the “unix user mapping” to email addresses, since that’s what bugzilla uses.
I then installed scmbug-common and scmbug-tools on the subversion server and configured it like:
scmbug_install_glue --scm=Subversion --product=myproduct --repository=file:///srv/code/svn --daemon=10.0.0.19 --binary-paths=/bin,/usr/bin --bug 845
I made up the bug number, used the first one that didn’t exist in bugzilla yet. It requires all of those options. the ‘file://’ part of the svn url is required or you get the error “** Scmbug error 25: file:// prefix not specified for Subversion repository path.”
I was a little iffy about the product, because we separate out our repository by product but it’s all in one svn repository. There is chat about it all matching up here and having product be required in the scmbug_install_glue script was a little disconcerting in the way that I expect things to not work.
I used TortoiseSVN on a windows box to quickly make a new directory and tag it with a bug I made (845, after the fact of running the install script). I hit a couple default policy problems like that the bug wasn’t open yet, then that my commit message wasn’t over 50 characters. All this can be tuned in ‘/srv/code/svn/hooks/etc/scmbug/glue.conf’ after you’ve installed the glue.
Low and behold though, the install worked. Props to the scmbug folks, that was much cleaner than the alternatives.
update: checkin linkification
I modified some older diffs against bugzilla to linkify the file list on checkin. The were on bug #266 in bugzilla for scmbug, but I can’t create a login right now for whatever reason. hopefully people find it here, since I’m using this on 3.0.3 and viewsvn, which is different than what’s on the bug right now.
WP doesn’t like me pasting the diff, wrapping in pre or code tags, so it is here in my git repo.
Thanks for posting this. I’m currently in the process of convincing my group to move to SVN and I’ve been looking at how to integrated it with Bugzilla. I haven’t yet got as far as implementation (esp since it will probably have to be hosted on Solaris), but this is a big help.
I’ve been trying for weeks to get to that site for SCMbug, but every time I go, It’s down…. makes me a little scared to be thinking about using something in production when they don’t have a site up. Nonetheless, I’d litke to get my hands on the latest debs to try.
From the Freshmeat project page, which I’d consider the project’s main page, I found a note here that says “mkgnu.net is inaccessible again and should be back at the end of August. Please hold off any questions until then.”
So in the interim, it looks like you can grab the debs here.