I just spent the afternoon playing around with usertags and the other recent BTS changes. It looks like a really useful addition to debbugs, and I'm sure we'll see a lot of interesing uses pop up. I immediately went and used it to mark bugs that have been fixed in the aptitude SVN by using a quick-and-dirty Python script to extract them from the ChangeLog; with some help from AJ, I even came up with a URL that separates these bugs out from the completely unresolved ones.
So that was pretty easy. Having done this, the next logical thought was, of course, "if I can extract bug numbers from the ChangeLog on my computer, couldn't an SVN hook script do the same thing?" A bit of hacking around later, I now have a script that does exactly this. To use it, download it and (optionally) the sample configuration file, and then add the following line to your post-commit hook:
path-to-svntag.py "$1" "$2" path-to-svntag.conf
The script looks for text like "Closes: #nnnnnn" in a file called "changelog" and sends appropriate tagging messages to the BTS when it's spotted.
Comment byat 2:25 AM:
There's already a conoical tag for fixed-in-svn: pending. No need to use usertags.
The tagpending script already tags stuff based on the changelog. It's been in Debian in devscripts for some time.
-- Joey Hess
Comment by dburrows at 9:33 AM:
Is pending really appropriate, though? Its documentation says:
A solution to this bug has been found and an upload will be made soon.
Stuff that's fixed in SVN is not necessarily going to have an upload "soon", and I've seen at least one person get confused by this (a few days ago there was a thread on -devel asking if a package was maintained, due to a bug that had been tagged "pending" for a long time).
At a quick glance, the tagpending script isn't appropriate for my uses, because it only parses debian/changelog and blows up if it's not being run in a Debian package's root directory. It also relies on the changelog being in the format of a Debian changelog, which the upstream SVN changelog for aptitude is not. The file location is easy to hack around, but the file format might be a bit trickier. In addition, tagpending doesn't look like it could be run as an SVN hook script without some modification or wrapping.
...so all in all, I think I did not quite reinvent the wheel :-).