patch which enables hgext/bugzilla.py to work with bugzilla v2.22.1
Matt Mackall
mpm at selenic.com
Fri Oct 19 18:14:52 UTC 2007
On Tue, Oct 02, 2007 at 08:52:00PM +0200, Benoit Boissinot wrote:
> On 10/2/07, Nick <lonnc2000 at yahoo.co.uk> wrote:
> > Hi,
> >
> > Have only just started using mercurial, so hope I am following the right
> > procedure.
>
> Thanks for your patch, I have a couple a comments below.
>
> > # HG changeset patch
> > # User lonnc2000 at yahoo.co.uk
> > # Date 1191331879 -3600
> > # Node ID 50de1188eb929978764b351d384ec7d5745d9791
> > # Parent 9189ae05467d36217f85970b585177bb5bcdc23b
> > Added support for bugzilla v2.22.1.
>
> We usually add a blank line after the short summary
>
> > No actual code changes were required. But when bugzilla version 2.22.1 (version
> > in Debian etch) is passed from the .hg/hgrc config it throws an exception
> > implying that there were database schema changes that will prevent this hook
> > from working.
> > In fact the database schema did not change in any way that affects this hook.
> >
>
> Please avoid lines > 80 chars
>
> > diff -r 9189ae05467d -r 50de1188eb92 hgext/bugzilla.py
> > --- a/hgext/bugzilla.py Sun Sep 30 16:38:42 2007 +0200
> > +++ b/hgext/bugzilla.py Tue Oct 02 14:31:19 2007 +0100
> > @@ -186,11 +186,18 @@ class bugzilla_2_16(object):
> > values (%s, %s, %s, %s)''',
> > (bugid, userid, now, self.longdesc_id))
> >
> > +class bugzilla_2_22_1(bugzilla_2_16):
> > + '''support for bugzilla version 2.22.1. Just extends bugzilla_2_16 there were no bugzilla database schema changes that affect this hook.'''
>
> 80 chars
> > +
> > + def __init__(self, ui):
> > + bugzilla_2_16.__init__(self, ui)
> > +
> > class bugzilla(object):
> > # supported versions of bugzilla. different versions have
> > # different schemas.
> > _versions = {
> > '2.16': bugzilla_2_16,
> > + '2.22.1': bugzilla_2_22_1,
>
> why not just:
> + '2.22.1': bugzilla_2_16,
> with a comment to say that the schema didn't change.
That's pretty crummy too. We should just assume we can work with
anything > 2.16 until we hear otherwise. And then we need to support ranges.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list