Mercurial > hg
changeset 33393:01a90fed5840
configitems: register the 'bugzilla.apikey' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 07 Jul 2017 10:03:22 +0200 |
parents | ac6446611ad2 |
children | a752d2e7ec9c |
files | hgext/bugzilla.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/bugzilla.py Mon Jul 10 16:41:13 2017 -0400 +++ b/hgext/bugzilla.py Fri Jul 07 10:03:22 2017 +0200 @@ -303,6 +303,7 @@ cmdutil, error, mail, + registrar, url, util, ) @@ -315,6 +316,13 @@ # leave the attribute unspecified. testedwith = 'ships-with-hg-core' +configtable = {} +configitem = registrar.configitem(configtable) + +configitem('bugzilla', 'apikey', + default='', +) + class bzaccess(object): '''Base class for access to Bugzilla.''' @@ -800,7 +808,7 @@ bz = self.ui.config('bugzilla', 'bzurl', 'http://localhost/bugzilla/') self.bzroot = '/'.join([bz, 'rest']) - self.apikey = self.ui.config('bugzilla', 'apikey', '') + self.apikey = self.ui.config('bugzilla', 'apikey') self.user = self.ui.config('bugzilla', 'user', 'bugs') self.passwd = self.ui.config('bugzilla', 'password') self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED')