Mercurial > hg-stable
comparison hgext/bugzilla.py @ 33466:9443a946efdc
configitems: register the 'bugzilla.timeout' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 07 Jul 2017 10:04:15 +0200 |
parents | 9a36b964165e |
children | 6de2cd9d9258 |
comparison
equal
deleted
inserted
replaced
33465:9a36b964165e | 33466:9443a946efdc |
---|---|
364 default=None, | 364 default=None, |
365 ) | 365 ) |
366 configitem('bugzilla', 'template', | 366 configitem('bugzilla', 'template', |
367 default=None, | 367 default=None, |
368 ) | 368 ) |
369 configitem('bugzilla', 'timeout', | |
370 default=5, | |
371 ) | |
369 | 372 |
370 class bzaccess(object): | 373 class bzaccess(object): |
371 '''Base class for access to Bugzilla.''' | 374 '''Base class for access to Bugzilla.''' |
372 | 375 |
373 def __init__(self, ui): | 376 def __init__(self, ui): |
443 | 446 |
444 host = self.ui.config('bugzilla', 'host') | 447 host = self.ui.config('bugzilla', 'host') |
445 user = self.ui.config('bugzilla', 'user', 'bugs') | 448 user = self.ui.config('bugzilla', 'user', 'bugs') |
446 passwd = self.ui.config('bugzilla', 'password') | 449 passwd = self.ui.config('bugzilla', 'password') |
447 db = self.ui.config('bugzilla', 'db') | 450 db = self.ui.config('bugzilla', 'db') |
448 timeout = int(self.ui.config('bugzilla', 'timeout', 5)) | 451 timeout = int(self.ui.config('bugzilla', 'timeout')) |
449 self.ui.note(_('connecting to %s:%s as %s, password %s\n') % | 452 self.ui.note(_('connecting to %s:%s as %s, password %s\n') % |
450 (host, db, user, '*' * len(passwd))) | 453 (host, db, user, '*' * len(passwd))) |
451 self.conn = bzmysql._MySQLdb.connect(host=host, | 454 self.conn = bzmysql._MySQLdb.connect(host=host, |
452 user=user, passwd=passwd, | 455 user=user, passwd=passwd, |
453 db=db, | 456 db=db, |