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

login
register
mail settings
Submitter Boris Feld
Date July 7, 2017, 6:57 p.m.
Message ID <3246453035686bafc15f.1499453859@FB>
Download mbox | patch
Permalink /patch/22105/
State Superseded
Headers show

Comments

Boris Feld - July 7, 2017, 6:57 p.m.
# HG changeset patch
# User Octobus <contact@octobus.net>
# Date 1499414608 -7200
#      Fri Jul 07 10:03:28 2017 +0200
# Node ID 3246453035686bafc15f262bf35f7cb18f755f59
# Parent  afee98344d67275a6bf631fc89629ca3e46e7166
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.bzurl' config

Patch

diff -r afee98344d67 -r 324645303568 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')