diff hgext/bugzilla.py @ 33470:ab493a8353d1

bugzilla: move the default regexp for fix in the config declaration This mimic the change requested by Yuya for '_default_bug_re'.
author Boris Feld <boris.feld@octobus.net>
date Fri, 14 Jul 2017 16:17:37 +0200
parents f2abf23a4d7b
children a89f8329e0b0
line wrap: on
line diff
--- 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