##// END OF EJS Templates
configitems: register the 'bugzilla.regexp' config...
Boris Feld -
r33462:c8417122 default
parent child Browse files
Show More
@@ -352,6 +352,11 b" configitem('bugzilla', 'host',"
352 configitem('bugzilla', 'password',
352 configitem('bugzilla', 'password',
353 default=None,
353 default=None,
354 )
354 )
355 configitem('bugzilla', 'regexp',
356 default=(r'bugs?\s*,?\s*(?:#|nos?\.?|num(?:ber)?s?)?\s*'
357 r'(?P<ids>(?:\d+\s*(?:,?\s*(?:and)?)?\s*)+)'
358 r'\.?\s*(?:h(?:ours?)?\s*(?P<hours>\d*(?:\.\d+)?))?')
359 )
355
360
356 class bzaccess(object):
361 class bzaccess(object):
357 '''Base class for access to Bugzilla.'''
362 '''Base class for access to Bugzilla.'''
@@ -963,10 +968,6 b' class bugzilla(object):'
963 'restapi': bzrestapi,
968 'restapi': bzrestapi,
964 }
969 }
965
970
966 _default_bug_re = (r'bugs?\s*,?\s*(?:#|nos?\.?|num(?:ber)?s?)?\s*'
967 r'(?P<ids>(?:\d+\s*(?:,?\s*(?:and)?)?\s*)+)'
968 r'\.?\s*(?:h(?:ours?)?\s*(?P<hours>\d*(?:\.\d+)?))?')
969
970 _default_fix_re = (r'fix(?:es)?\s*(?:bugs?\s*)?,?\s*'
971 _default_fix_re = (r'fix(?:es)?\s*(?:bugs?\s*)?,?\s*'
971 r'(?:nos?\.?|num(?:ber)?s?)?\s*'
972 r'(?:nos?\.?|num(?:ber)?s?)?\s*'
972 r'(?P<ids>(?:#?\d+\s*(?:,?\s*(?:and)?)?\s*)+)'
973 r'(?P<ids>(?:#?\d+\s*(?:,?\s*(?:and)?)?\s*)+)'
@@ -985,8 +986,7 b' class bugzilla(object):'
985 self.bzdriver = bzclass(self.ui)
986 self.bzdriver = bzclass(self.ui)
986
987
987 self.bug_re = re.compile(
988 self.bug_re = re.compile(
988 self.ui.config('bugzilla', 'regexp',
989 self.ui.config('bugzilla', 'regexp'), re.IGNORECASE)
989 bugzilla._default_bug_re), re.IGNORECASE)
990 self.fix_re = re.compile(
990 self.fix_re = re.compile(
991 self.ui.config('bugzilla', 'fixregexp'), re.IGNORECASE)
991 self.ui.config('bugzilla', 'fixregexp'), re.IGNORECASE)
992 self.split_re = re.compile(r'\D+')
992 self.split_re = re.compile(r'\D+')
General Comments 0
You need to be logged in to leave comments. Login now