# HG changeset patch # User Boris Feld # Date 1500041857 -7200 # Node ID ab493a8353d129af3d09e3bf9a37c740636ee217 # Parent f2abf23a4d7bb4a2082d385c9c4a85d08af534af bugzilla: move the default regexp for fix in the config declaration This mimic the change requested by Yuya for '_default_bug_re'. diff -r f2abf23a4d7b -r ab493a8353d1 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(?:#?\d+\s*(?:,?\s*(?:and)?)?\s*)+)' + r'\.?\s*(?:h(?:ours?)?\s*(?P\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(?:#?\d+\s*(?:,?\s*(?:and)?)?\s*)+)' - r'\.?\s*(?:h(?:ours?)?\s*(?P\d*(?:\.\d+)?))?') - def __init__(self, ui, repo): self.ui = ui self.repo = repo