hg_hooks/bugzilla/versiontobugzilla.py
author tahirm@symbian.org
Thu, 23 Jul 2009 12:50:28 +0100
changeset 22 f55ca49f7f44
child 42 ac3a70c9f81c
permissions -rw-r--r--
Added initial versions of filecheck and hg tags to bugzilla version hooks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     1
'''Bugzilla integration for adding versions from tags
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     2
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     3
The hook updates the Bugzilla database directly. Only Bugzilla installations
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     4
using MySQL are supported.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     5
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     6
This hook uses the same .hgrc parameters as the default Bugzilla hook. There
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     7
is no need for configuring the same stuff twice. (connection, etc.)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     8
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
     9
Configuring the extension: (same as Bugzilla -hook)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    10
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    11
    [bugzilla]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    12
    host       Hostname of the MySQL server holding the Bugzilla database.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    13
    db         Name of the Bugzilla database in MySQL. Default 'bugs'.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    14
    user       Username to use to access MySQL server. Default 'bugs'.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    15
    password   Password to use to access MySQL server.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    16
    timeout    Database connection timeout (seconds). Default 5.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    17
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    18
Additional elements under Bugzilla -section: (new items)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    19
    [bugzilla]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    20
    product    The name on the Bugzilla product that is used for adding 
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    21
               the new versions.
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    22
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    23
Activating the extension:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    24
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    25
    [extensions]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    26
    hgext.versiontobugzilla =
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    27
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    28
    [hooks]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    29
    incoming.versiontobugzilla = python:hgext.versiontobugzilla.hook
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    30
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    31
Example configuration in hgrc:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    32
    [bugzilla]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    33
    host = localhost
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    34
    user = bugs
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    35
    password = password
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    36
    product = my_product
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    37
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    38
    [extensions]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    39
    hgext.versiontobugzilla =
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    40
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    41
    [hooks]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    42
    incoming.versiontobugzilla = python:hgext.versiontobugzilla.hook
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    43
'''
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    44
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    45
from mercurial import util
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    46
import re
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    47
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    48
MySQLdb = None
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    49
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    50
class BugzillaClient:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    51
    
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    52
    def __init__(self, ui, repo, node):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    53
        self.tag = None
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    54
        self.ui = ui
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    55
        self.repo = repo
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    56
        self.node = node
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    57
        self.product = ui.config('bugzilla', 'product')
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    58
        self.host = ui.config('bugzilla', 'host', 'localhost')
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    59
        self.user = ui.config('bugzilla', 'user', 'bugs')
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    60
        self.passwd = ui.config('bugzilla', 'password')
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    61
        self.db = ui.config('bugzilla', 'db', 'bugs')
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    62
        self.timeout = int(ui.config('bugzilla', 'timeout', 10))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    63
        self.connection = MySQLdb.connect(host=self.host, user=self.user, passwd=self.passwd,
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    64
                                    db=self.db, connect_timeout=self.timeout)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    65
        self.cursor = self.connection.cursor()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    66
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    67
    def printMessageInVerboseMode(self, message):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    68
        '''Prints a message to console if hg has been executed with -v option.'''
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    69
        self.ui.note(message)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    70
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    71
    def executeDatabaseQuery(self, *args, **kwargs):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    72
        self.printMessageInVerboseMode('Bugzilla: query: %s %s\n' % (args, kwargs))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    73
        try:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    74
            self.cursor.execute(*args, **kwargs)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    75
        except MySQLdb.MySQLError:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    76
            self.printMessageInVerboseMode('Bugzilla: failed query: %s %s\n' % (args, kwargs))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    77
            raise
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    78
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    79
    def commitContainsTag(self):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    80
        self.parseTagFromCommitMessage()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    81
        if self.tag:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    82
            return True
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    83
        else:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    84
            return False
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    85
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    86
    def parseTagFromCommitMessage(self):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    87
        ctx = self.repo[self.node]
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    88
        version_re = re.compile(('Added tag (.+) for changeset [0-9a-h]+'), re.IGNORECASE)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    89
        m = version_re.search(ctx.description())
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    90
        if m:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    91
            self.tag = m.group(1)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    92
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    93
    def insertTagIntoDatabase(self):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    94
        self.makeSureThatProductExists()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    95
        if not self.doesVersionAlreadyExist():
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    96
            self.printMessageInVerboseMode("Bugzilla: adding version '%s' to product '%s' in database.\n" % (self.tag, self.product))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    97
            self.insertNewVersionIntoDatabase()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    98
        else:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
    99
            self.printMessageInVerboseMode("Bugzilla: product '%s' already has a version '%s' in database. Not trying to add it again." % (self.product, self.tag))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   100
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   101
    def makeSureThatProductExists(self):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   102
        self.executeDatabaseQuery('select id from products where name = %s', (self.product,))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   103
        ids = self.cursor.fetchall()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   104
        if len(ids) != 1:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   105
            raise util.Abort("Product '%s' does not exist in database, please check the [bugzilla] -section in hgrc." % self.product)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   106
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   107
    def doesVersionAlreadyExist(self):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   108
        self.executeDatabaseQuery('select * from versions where value = %s and product_id in (select id from products where name=%s )', (self.tag, self.product))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   109
        ids = self.cursor.fetchall()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   110
        if len(ids) == 1:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   111
            return True
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   112
        else:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   113
            return False
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   114
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   115
    def insertNewVersionIntoDatabase(self):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   116
        self.executeDatabaseQuery('insert into versions (value, product_id) values (%s, (select id from products where name=%s ))', (self.tag, self.product))
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   117
        self.connection.commit()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   118
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   119
def hook(ui, repo, hooktype, node=None, **kwargs):
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   120
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   121
    try:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   122
        import MySQLdb as mysql
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   123
        global MySQLdb
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   124
        MySQLdb = mysql
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   125
    except ImportError, err:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   126
        raise util.Abort('MySQL driver not installed: %s' % err)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   127
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   128
    if node is None:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   129
        raise util.Abort('Only hooks that have changesetid''s can be used.')
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   130
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   131
    try: 
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   132
        bzClient = BugzillaClient(ui, repo, node)
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   133
        if bzClient.commitContainsTag():
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   134
            bzClient.insertTagIntoDatabase()
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   135
    except MySQLdb.MySQLError, err:
f55ca49f7f44 Added initial versions of filecheck and hg tags to bugzilla version hooks
tahirm@symbian.org
parents:
diff changeset
   136
        raise util.Abort('Database error: %s' % err[1])