Patchwork [07,of,10,V2] configitems: register the 'bugzilla.fixregexp' config

login
register
mail settings
Submitter Boris Feld
Date July 11, 2017, 3:59 p.m.
Message ID <0bb83a78698c7762b4c0.1499788781@FB>
Download mbox | patch
Permalink /patch/22235/
State Accepted
Headers show

Comments

Boris Feld - July 11, 2017, 3:59 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1499414616 -7200
#      Fri Jul 07 10:03:36 2017 +0200
# Node ID 0bb83a78698c7762b4c0a897797f5340cc9d0684
# Parent  cdef7e9e6b3cd6785755edb3cb1be3cb9cec2799
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.fixregexp' config

Patch

diff -r cdef7e9e6b3c -r 0bb83a78698c hgext/bugzilla.py
--- 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):