[PATCH 04 of 10] configitems: register the 'bugzilla.strip' config
Boris Feld
boris.feld at octobus.net
Wed Jul 12 12:41:27 UTC 2017
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1499414649 -7200
# Fri Jul 07 10:04:09 2017 +0200
# Node ID 69feb1d1d3d3b2d2dee30941cc910b7a1b98b04b
# Parent 1ca312b6211d3bde677c53972abd95c4be45f8ff
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.strip' config
diff -r 1ca312b6211d -r 69feb1d1d3d3 hgext/bugzilla.py
--- a/hgext/bugzilla.py Fri Jul 07 10:04:07 2017 +0200
+++ b/hgext/bugzilla.py Fri Jul 07 10:04:09 2017 +0200
@@ -355,6 +355,9 @@
configitem('bugzilla', 'regexp',
default=lambda: bugzilla._default_bug_re,
)
+configitem('bugzilla', 'strip',
+ default=0,
+)
class bzaccess(object):
'''Base class for access to Bugzilla.'''
@@ -1057,7 +1060,7 @@
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('/')
More information about the Mercurial-devel
mailing list