# HG changeset patch # User Boris Feld # Date 2017-07-07 08:04:09 # Node ID 037d809737fb4fb456130fd6ab06161577d90ccb # Parent c841712253d5a27e1da21aafac432aadf4db9442 configitems: register the 'bugzilla.strip' config diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py --- a/hgext/bugzilla.py +++ b/hgext/bugzilla.py @@ -357,6 +357,9 @@ configitem('bugzilla', 'regexp', r'(?P(?:\d+\s*(?:,?\s*(?:and)?)?\s*)+)' r'\.?\s*(?:h(?:ours?)?\s*(?P\d*(?:\.\d+)?))?') ) +configitem('bugzilla', 'strip', + default=0, +) class bzaccess(object): '''Base class for access to Bugzilla.''' @@ -1055,7 +1058,7 @@ class bugzilla(object): def webroot(root): '''strip leading prefix of repo root and turn into url-safe path.''' - count = int(self.ui.config('bugzilla', 'strip', 0)) + count = int(self.ui.config('bugzilla', 'strip')) root = util.pconvert(root) while count > 0: c = root.find('/')