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

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

Comments

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

Patch

diff -r dcec97037a78 -r 19f7670da891 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):