Mercurial > hg
comparison hgext/bugzilla.py @ 33399:bab1f3242140
configitems: register the 'bugzilla.fixregexp' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 07 Jul 2017 10:03:36 +0200 |
parents | 69d85abe4cba |
children | 76ca5097a2b6 |
comparison
equal
deleted
inserted
replaced
33398:69d85abe4cba | 33399:bab1f3242140 |
---|---|
334 configitem('bugzilla', 'bzuser', | 334 configitem('bugzilla', 'bzuser', |
335 default=None, | 335 default=None, |
336 ) | 336 ) |
337 configitem('bugzilla', 'db', | 337 configitem('bugzilla', 'db', |
338 default='bugs', | 338 default='bugs', |
339 ) | |
340 configitem('bugzilla', 'fixregexp', | |
341 default=lambda: bugzilla._default_fix_re, | |
339 ) | 342 ) |
340 | 343 |
341 class bzaccess(object): | 344 class bzaccess(object): |
342 '''Base class for access to Bugzilla.''' | 345 '''Base class for access to Bugzilla.''' |
343 | 346 |
973 | 976 |
974 self.bug_re = re.compile( | 977 self.bug_re = re.compile( |
975 self.ui.config('bugzilla', 'regexp', | 978 self.ui.config('bugzilla', 'regexp', |
976 bugzilla._default_bug_re), re.IGNORECASE) | 979 bugzilla._default_bug_re), re.IGNORECASE) |
977 self.fix_re = re.compile( | 980 self.fix_re = re.compile( |
978 self.ui.config('bugzilla', 'fixregexp', | 981 self.ui.config('bugzilla', 'fixregexp'), re.IGNORECASE) |
979 bugzilla._default_fix_re), re.IGNORECASE) | |
980 self.split_re = re.compile(r'\D+') | 982 self.split_re = re.compile(r'\D+') |
981 | 983 |
982 def find_bugs(self, ctx): | 984 def find_bugs(self, ctx): |
983 '''return bugs dictionary created from commit comment. | 985 '''return bugs dictionary created from commit comment. |
984 | 986 |