Post it anyway, I’ve done a bit with cvs commit messages and
bug closing, albeit with debbugs, perhaps I can help.
I think it’s pretty much working now, and I’ve even tidied the code a
little (although my perl, and the indentation, etc, still leave a fair
bit to be desired).
Have you guys looked at simply updating the rt calls from the
cvs commit handler for RT2?
Absolutely! This is essentially just that, although I cheated a little
on the RT calls… There’s a reason this script’s name closely resembles
that of rt-mailgate.
As far as usage is concerned, follow the usage instructions at the top
of the file, for lines to insert into CVS configuration files, and
customise the following five variables: $cvs_user, $cvs_domain,
$rt_address, $rt_name, $rt_url. If anyone sees a benefit to making this
script read RT’s config, then go ahead; I didn’t bother, because chances
are, this will often be on a separate machine to the RT installation
Obviously, you won’t be able to use this to do fun things like resolve
tickets unless you’ve also applied my enhanced-mailgate patch.
I nearly forgot… I should probably give a sample of the format I
created (my priority was, at the time, just to get something working for
myself, at which point efficiency, and not backward compatibility, was
<< Start commit message >>
This is just plain ordinary commit message content.
It won’t be added to any tickets.
This message will be added as a comment to ticket #1234.
Ticket messages aren’t limited to one line, either, of course.
This message will be added as a comment to ticket #2345, which will then
be resolved (!).
This message will be added as a reply ® to ticket #1024, and include
instructions for obtaining a diff of each file changed.
This message has a custom subject (s), instead of the default ‘CVS
Commit’. Also note that the colon seen on ticket #1024 is optional.
This is more plain message. It won’t be added to any ticket, because it
is under ticket #0.
This reply ®, with a custom subject (s), will contain diff
instructions (d), as well as having additional enhanced-mailgate format
commands (Status, Owner). Note that the subject comes BEFORE mailgate
commands, when you use the ‘s’ option.
Also, you can use colons to separate each option, if you like.
I can add another block for a ticket I’ve already updated previously.
This will create a new comment (or in this case, reply), after the
I can update multiple tickets at once, too! Those three tickets will not
have any evidence that I was lazy and only did the one update, unless
someone notices the messages are all the same. Note that the options (in
this case, resolve [!], and diff [d]), apply to ALL tickets listed –
there’s no way to specify options for one ticket, but not another (for
now, at least).
<< End commit message >>
Hopefully, someone can put this to good use!
rt-cvsgate.txt (16.6 KB)