From patchwork Fri Jul 14 15:26:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5,of,9,V2] configitems: register the 'bugzilla.timeout' config From: Boris Feld X-Patchwork-Id: 22337 Message-Id: <65e197186ba97e77bb9d.1500045982@FB> To: mercurial-devel@mercurial-scm.org Cc: boris.feld@octobus.net Date: Fri, 14 Jul 2017 17:26:22 +0200 # HG changeset patch # User Boris Feld # Date 1499414655 -7200 # Fri Jul 07 10:04:15 2017 +0200 # Node ID 65e197186ba97e77bb9db6f28cd8a967ff46b98d # Parent 4bd1ace2b13873052c6376f0656e55b3b11910e3 # EXP-Topic config.register.bugzilla configitems: register the 'bugzilla.timeout' config diff -r 4bd1ace2b138 -r 65e197186ba9 hgext/bugzilla.py --- a/hgext/bugzilla.py Fri Jul 07 10:04:13 2017 +0200 +++ b/hgext/bugzilla.py Fri Jul 07 10:04:15 2017 +0200 @@ -366,6 +366,9 @@ configitem('bugzilla', 'template', default=None, ) +configitem('bugzilla', 'timeout', + default=5, +) class bzaccess(object): '''Base class for access to Bugzilla.''' @@ -445,7 +448,7 @@ user = self.ui.config('bugzilla', 'user', 'bugs') passwd = self.ui.config('bugzilla', 'password') db = self.ui.config('bugzilla', 'db') - timeout = int(self.ui.config('bugzilla', 'timeout', 5)) + timeout = int(self.ui.config('bugzilla', 'timeout')) self.ui.note(_('connecting to %s:%s as %s, password %s\n') % (host, db, user, '*' * len(passwd))) self.conn = bzmysql._MySQLdb.connect(host=host,