Patchwork [04,of,10,V2] configitems: register the 'bugzilla.bzurl' config

login
register
mail settings
Submitter Boris Feld
Date July 11, 2017, 3:59 p.m.
Message ID <b98505c496cf15809cd9.1499788778@FB>
Download mbox | patch
Permalink /patch/22231/
State Accepted
Headers show

Comments

Boris Feld - July 11, 2017, 3:59 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1499414608 -7200
#      Fri Jul 07 10:03:28 2017 +0200
# Node ID b98505c496cf15809cd90e5bdab5165d4731dbd8
# Parent  97aa2edd521c6999219991836ba66abb0aeb2bd9
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.bzurl' config

Patch

diff -r 97aa2edd521c -r b98505c496cf hgext/bugzilla.py
--- a/hgext/bugzilla.py	Fri Jul 07 10:03:26 2017 +0200
+++ b/hgext/bugzilla.py	Fri Jul 07 10:03:28 2017 +0200
@@ -328,6 +328,9 @@ 
 configitem('bugzilla', 'bzemail',
     default=None,
 )
+configitem('bugzilla', 'bzurl',
+    default='http://localhost/bugzilla/',
+)
 
 class bzaccess(object):
     '''Base class for access to Bugzilla.'''
@@ -649,8 +652,7 @@ 
     def __init__(self, ui):
         bzaccess.__init__(self, ui)
 
-        bzweb = self.ui.config('bugzilla', 'bzurl',
-                               'http://localhost/bugzilla/')
+        bzweb = self.ui.config('bugzilla', 'bzurl')
         bzweb = bzweb.rstrip("/") + "/xmlrpc.cgi"
 
         user = self.ui.config('bugzilla', 'user', 'bugs')
@@ -810,8 +812,7 @@ 
     """
     def __init__(self, ui):
         bzaccess.__init__(self, ui)
-        bz = self.ui.config('bugzilla', 'bzurl',
-                            'http://localhost/bugzilla/')
+        bz = self.ui.config('bugzilla', 'bzurl')
         self.bzroot = '/'.join([bz, 'rest'])
         self.apikey = self.ui.config('bugzilla', 'apikey')
         self.user = self.ui.config('bugzilla', 'user', 'bugs')