comparison hgext/bugzilla.py @ 33394:a752d2e7ec9c

configitems: register the 'bugzilla.bzdir' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 07 Jul 2017 10:03:24 +0200
parents 01a90fed5840
children b33d63651693
comparison
equal deleted inserted replaced
33393:01a90fed5840 33394:a752d2e7ec9c
319 configtable = {} 319 configtable = {}
320 configitem = registrar.configitem(configtable) 320 configitem = registrar.configitem(configtable)
321 321
322 configitem('bugzilla', 'apikey', 322 configitem('bugzilla', 'apikey',
323 default='', 323 default='',
324 )
325 configitem('bugzilla', 'bzdir',
326 default='/var/www/html/bugzilla',
324 ) 327 )
325 328
326 class bzaccess(object): 329 class bzaccess(object):
327 '''Base class for access to Bugzilla.''' 330 '''Base class for access to Bugzilla.'''
328 331
455 self.ui.status(_('telling bugzilla to send mail:\n')) 458 self.ui.status(_('telling bugzilla to send mail:\n'))
456 (user, userid) = self.get_bugzilla_user(committer) 459 (user, userid) = self.get_bugzilla_user(committer)
457 for id in bugs.keys(): 460 for id in bugs.keys():
458 self.ui.status(_(' bug %s\n') % id) 461 self.ui.status(_(' bug %s\n') % id)
459 cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify) 462 cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify)
460 bzdir = self.ui.config('bugzilla', 'bzdir', 463 bzdir = self.ui.config('bugzilla', 'bzdir')
461 '/var/www/html/bugzilla')
462 try: 464 try:
463 # Backwards-compatible with old notify string, which 465 # Backwards-compatible with old notify string, which
464 # took one string. This will throw with a new format 466 # took one string. This will throw with a new format
465 # string. 467 # string.
466 cmd = cmdfmt % id 468 cmd = cmdfmt % id