[PATCH] Fix Hg Bugzilla extension to work with new Bugzilla 3.2

Jim Hague jim.hague at acm.org
Tue Dec 9 03:58:53 CST 2008


# HG changeset patch
# User Jim Hague <jim.hague at acm.org>
# Date 1228816693 0
# Node ID 69fc1eaf39029386b3e05ac4b3a697d20352bc34
# Parent  6aafd75fb924b6b79fd5653e61efcdc29923ae48
Fix Bugzilla integration to work with new Bugzilla 3.2.

Bugzilla 3.2 changes the type of all MySQL tables it uses from MyISAM
to InnoDB. MyISAM does not support transactions, and performs an implied
commit after each update. InnoDB does support transactions, and so
exposes a bug where changes to the Bugzilla database were not committed,
and so with 3.2 are lost when the database connection closes.

diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py
--- a/hgext/bugzilla.py
+++ b/hgext/bugzilla.py
@@ -185,6 +185,7 @@
         self.run('''insert into bugs_activity (bug_id, who, bug_when, fieldid)
                     values (%s, %s, %s, %s)''',
                  (bugid, userid, now, self.longdesc_id))
+        self.conn.commit()
 
 class bugzilla_3_0(bugzilla_2_16):
     '''support for bugzilla 3.0 series.'''


More information about the Mercurial-devel mailing list