# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1500041857 -7200 # Fri Jul 14 16:17:37 2017 +0200 # Node ID 9da870e7c1057d9067da0eebea81d6adcc170664 # Parent 7a9c79633732fd90db14a33d13803cf34eb35028 # EXP-Topic config.register.bugzilla bugzilla: move the default regexp for fix in the config declaration
This mimic the change requested by Yuya for '_default_bug_re'. diff -r 7a9c79633732 -r 9da870e7c105 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 _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel