bugzilla: move the default regexp for fix in the config declaration
authorBoris Feld <boris.feld@octobus.net>
Fri, 14 Jul 2017 16:17:37 +0200
changeset 33470 ab493a8353d1
parent 33469 f2abf23a4d7b
child 33471 d74141ccfd8b
bugzilla: move the default regexp for fix in the config declaration This mimic the change requested by Yuya for '_default_bug_re'.
hgext/bugzilla.py
--- a/hgext/bugzilla.py	Fri Jul 07 10:04:21 2017 +0200
+++ b/hgext/bugzilla.py	Fri Jul 14 16:17:37 2017 +0200
@@ -338,7 +338,10 @@
     default='bugs',
 )
 configitem('bugzilla', 'fixregexp',
-    default=lambda: bugzilla._default_fix_re,
+    default=(r'fix(?:es)?\s*(?:bugs?\s*)?,?\s*'
+             r'(?:nos?\.?|num(?:ber)?s?)?\s*'
+             r'(?P<ids>(?:#?\d+\s*(?:,?\s*(?:and)?)?\s*)+)'
+             r'\.?\s*(?:h(?:ours?)?\s*(?P<hours>\d*(?:\.\d+)?))?')
 )
 configitem('bugzilla', 'fixresolution',
     default='FIXED',
@@ -989,11 +992,6 @@
         'restapi': bzrestapi,
         }
 
-    _default_fix_re = (r'fix(?:es)?\s*(?:bugs?\s*)?,?\s*'
-                       r'(?:nos?\.?|num(?:ber)?s?)?\s*'
-                       r'(?P<ids>(?:#?\d+\s*(?:,?\s*(?:and)?)?\s*)+)'
-                       r'\.?\s*(?:h(?:ours?)?\s*(?P<hours>\d*(?:\.\d+)?))?')
-
     def __init__(self, ui, repo):
         self.ui = ui
         self.repo = repo