comparison hgext/bugzilla.py @ 33400:76ca5097a2b6

configitems: register the 'bugzilla.fixresolution' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 07 Jul 2017 10:05:40 +0200
parents bab1f3242140
children 960350659fa5
comparison
equal deleted inserted replaced
33399:bab1f3242140 33400:76ca5097a2b6
337 configitem('bugzilla', 'db', 337 configitem('bugzilla', 'db',
338 default='bugs', 338 default='bugs',
339 ) 339 )
340 configitem('bugzilla', 'fixregexp', 340 configitem('bugzilla', 'fixregexp',
341 default=lambda: bugzilla._default_fix_re, 341 default=lambda: bugzilla._default_fix_re,
342 )
343 configitem('bugzilla', 'fixresolution',
344 default='FIXED',
342 ) 345 )
343 346
344 class bzaccess(object): 347 class bzaccess(object):
345 '''Base class for access to Bugzilla.''' 348 '''Base class for access to Bugzilla.'''
346 349
666 669
667 user = self.ui.config('bugzilla', 'user', 'bugs') 670 user = self.ui.config('bugzilla', 'user', 'bugs')
668 passwd = self.ui.config('bugzilla', 'password') 671 passwd = self.ui.config('bugzilla', 'password')
669 672
670 self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED') 673 self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED')
671 self.fixresolution = self.ui.config('bugzilla', 'fixresolution', 674 self.fixresolution = self.ui.config('bugzilla', 'fixresolution')
672 'FIXED')
673 675
674 self.bzproxy = xmlrpclib.ServerProxy(bzweb, self.transport(bzweb)) 676 self.bzproxy = xmlrpclib.ServerProxy(bzweb, self.transport(bzweb))
675 ver = self.bzproxy.Bugzilla.version()['version'].split('.') 677 ver = self.bzproxy.Bugzilla.version()['version'].split('.')
676 self.bzvermajor = int(ver[0]) 678 self.bzvermajor = int(ver[0])
677 self.bzverminor = int(ver[1]) 679 self.bzverminor = int(ver[1])
825 self.bzroot = '/'.join([bz, 'rest']) 827 self.bzroot = '/'.join([bz, 'rest'])
826 self.apikey = self.ui.config('bugzilla', 'apikey') 828 self.apikey = self.ui.config('bugzilla', 'apikey')
827 self.user = self.ui.config('bugzilla', 'user', 'bugs') 829 self.user = self.ui.config('bugzilla', 'user', 'bugs')
828 self.passwd = self.ui.config('bugzilla', 'password') 830 self.passwd = self.ui.config('bugzilla', 'password')
829 self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED') 831 self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED')
830 self.fixresolution = self.ui.config('bugzilla', 'fixresolution', 832 self.fixresolution = self.ui.config('bugzilla', 'fixresolution')
831 'FIXED')
832 833
833 def apiurl(self, targets, include_fields=None): 834 def apiurl(self, targets, include_fields=None):
834 url = '/'.join([self.bzroot] + [str(t) for t in targets]) 835 url = '/'.join([self.bzroot] + [str(t) for t in targets])
835 qv = {} 836 qv = {}
836 if self.apikey: 837 if self.apikey: