Regarding CVS -Urgent!!!!!

Dave Swegen dswegen at software.plasmon.com
Mon Feb 10 15:58:16 UTC 2003


On Mon, Feb 10, 2003 at 12:51:21PM -0200, Christian Reis wrote:
> On Mon, Feb 10, 2003 at 02:27:41PM +0000, Dave Swegen wrote:
> > The way I did it at work was to use the contrib/bugzilla_email_append.pl
> > script which picks up mails from a script called by CVSROOT/loginfo.
> > Works like a charm. I modified it to allow appending a commit log to
> > multiple bugs.
> 
> Does it access the database directly?

contrib/bugzilla_append_email.pl does, yes.

[stuff deleted]

> If you'd like to take this off my hands, I'm happy to. The bug relevant
> in this case is:
> 
>     http://bugzilla.mozilla.org/show_bug.cgi?id=129765
> 
> Though it cites Bonsai I don't think bonsai is really important here -
> the script should work even if bonsai isn't there.

I'm not going to even go anywhere near venturing out on a limb on this
one - I'm far too chicken :) And I know next to nothing (actually, make
that nothing) about how Bonsai works.

I have to say that I'm surprised that whenever the whole cvs->bugzilla
questions gets raised it seems that nobody mentions the
contrib/bugzilla_email_append script. Is it considered too bad, or is it
just forgotten?

In brief the system goes as follows:

cvs->CVSROOT/script, which gets a list of bug ids to which the comment
should get attached. It also grabs the comment (obviously), the old and
the new version, and the branch it is on.

CVSROOT/script->email->contrib/bugzilla_email_append.pl via a unqiue user
on the same system as bz. This script checks that the bug-ids are valid,
and that the sending user is valid, and then simply appends the comment
as that user.

It will however fail if the email address that the CVS system sends it
as doesn't match that of the users bugzilla login. I will probably fix
this by having any such non-existant users default to a bugzilla-logger
user (or somesuch). Only problem with that approach is that it leaves
the system even more open to abuse.

The other minor problem is that if you do a mass commit which cover
multiple subdirectories, CVS treats each set of sub-directory files as a
separate commit, and thus you get one comment per subdirectory. Ugly,
but still useable (we are thinking of patching cvs to not do this).

Oh, and I have no idea if it would work on a windows system (and
frankly, I don't care ;)

If it sounds reasonable I'll post a patch to the contrib directory to
bug 129765, and I'll let you sort it out from there.

Cheers
    Dave



More information about the developers mailing list