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

Boris Feld boris.feld at octobus.net
Tue Jul 11 11:59:41 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at 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

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):


More information about the Mercurial-devel mailing list