Fix Bugzilla integration to work with new Bugzilla 3.2.
authorJim Hague <jim.hague@acm.org>
Tue, 09 Dec 2008 09:58:13 +0000
changeset 7493 518afef5e350
parent 7492 8649b2a3de75
child 7495 90487273f59c
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.
hgext/bugzilla.py
--- a/hgext/bugzilla.py	Mon Dec 08 20:42:53 2008 +0100
+++ b/hgext/bugzilla.py	Tue Dec 09 09:58:13 2008 +0000
@@ -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.'''