Patchwork [08,of,10] configitems: register the 'bugzilla.fixresolution' config

login
register
mail settings
Submitter Boris Feld
Date July 7, 2017, 6:57 p.m.
Message ID <c272cde1e7f4353121b6.1499453863@FB>
Download mbox | patch
Permalink /patch/22111/
State Superseded
Headers show

Comments

Boris Feld - July 7, 2017, 6:57 p.m.
# HG changeset patch
# User Octobus <contact@octobus.net>
# Date 1499414740 -7200
#      Fri Jul 07 10:05:40 2017 +0200
# Node ID c272cde1e7f4353121b69cbda1ab254e89db81a2
# Parent  19f7670da89197d4770c474f65bcc8427e1e07ad
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.fixresolution' config

Patch

diff -r 19f7670da891 -r c272cde1e7f4 hgext/bugzilla.py
--- a/hgext/bugzilla.py	Fri Jul 07 10:03:36 2017 +0200
+++ b/hgext/bugzilla.py	Fri Jul 07 10:05:40 2017 +0200
@@ -340,6 +340,9 @@ 
 configitem('bugzilla', 'fixregexp',
     default=lambda: bugzilla._default_fix_re,
 )
+configitem('bugzilla', 'fixresolution',
+    default='FIXED',
+)
 
 class bzaccess(object):
     '''Base class for access to Bugzilla.'''
@@ -668,8 +671,7 @@ 
         passwd = self.ui.config('bugzilla', 'password')
 
         self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED')
-        self.fixresolution = self.ui.config('bugzilla', 'fixresolution',
-                                            'FIXED')
+        self.fixresolution = self.ui.config('bugzilla', 'fixresolution')
 
         self.bzproxy = xmlrpclib.ServerProxy(bzweb, self.transport(bzweb))
         ver = self.bzproxy.Bugzilla.version()['version'].split('.')
@@ -827,8 +829,7 @@ 
         self.user = self.ui.config('bugzilla', 'user', 'bugs')
         self.passwd = self.ui.config('bugzilla', 'password')
         self.fixstatus = self.ui.config('bugzilla', 'fixstatus', 'RESOLVED')
-        self.fixresolution = self.ui.config('bugzilla', 'fixresolution',
-                                            'FIXED')
+        self.fixresolution = self.ui.config('bugzilla', 'fixresolution')
 
     def apiurl(self, targets, include_fields=None):
         url = '/'.join([self.bzroot] + [str(t) for t in targets])