From patchwork Tue Jul 11 15:59:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [07,of,10,V2] configitems: register the 'bugzilla.fixregexp' config From: Boris Feld X-Patchwork-Id: 22235 Message-Id: <0bb83a78698c7762b4c0.1499788781@FB> To: mercurial-devel@mercurial-scm.org Cc: boris.feld@octobus.net Date: Tue, 11 Jul 2017 17:59:41 +0200 # HG changeset patch # User Boris Feld # 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):