changeset 33399:bab1f3242140

configitems: register the 'bugzilla.fixregexp' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 07 Jul 2017 10:03:36 +0200
parents 69d85abe4cba
children 76ca5097a2b6
files hgext/bugzilla.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/bugzilla.py	Fri Jul 07 10:03:34 2017 +0200
+++ b/hgext/bugzilla.py	Fri Jul 07 10:03:36 2017 +0200
@@ -337,6 +337,9 @@
 configitem('bugzilla', 'db',
     default='bugs',
 )
+configitem('bugzilla', 'fixregexp',
+    default=lambda: bugzilla._default_fix_re,
+)
 
 class bzaccess(object):
     '''Base class for access to Bugzilla.'''
@@ -975,8 +978,7 @@
             self.ui.config('bugzilla', 'regexp',
                            bugzilla._default_bug_re), re.IGNORECASE)
         self.fix_re = re.compile(
-            self.ui.config('bugzilla', 'fixregexp',
-                           bugzilla._default_fix_re), re.IGNORECASE)
+            self.ui.config('bugzilla', 'fixregexp'), re.IGNORECASE)
         self.split_re = re.compile(r'\D+')
 
     def find_bugs(self, ctx):