# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1499414657 -7200
#      Fri Jul 07 10:04:17 2017 +0200
# Node ID b3631f450acf389945b3abd5c68137f7f06e783d
# Parent  5b67961350d4084c8e50c14826335f69711fa65d
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.user' config

diff -r 5b67961350d4 -r b3631f450acf hgext/bugzilla.py
--- a/hgext/bugzilla.py Fri Jul 07 10:04:15 2017 +0200
+++ b/hgext/bugzilla.py Fri Jul 07 10:04:17 2017 +0200
@@ -367,6 +367,9 @@
 configitem('bugzilla', 'timeout',
     default=5,
 )
+configitem('bugzilla', 'user',
+    default='bugs',
+)
 
 class bzaccess(object):
     '''Base class for access to Bugzilla.'''
@@ -443,7 +446,7 @@
         bzaccess.__init__(self, ui)
 
         host = self.ui.config('bugzilla', 'host')
-        user = self.ui.config('bugzilla', 'user', 'bugs')
+        user = self.ui.config('bugzilla', 'user')
         passwd = self.ui.config('bugzilla', 'password')
         db = self.ui.config('bugzilla', 'db')
         timeout = int(self.ui.config('bugzilla', 'timeout'))
@@ -691,7 +694,7 @@
         bzweb = self.ui.config('bugzilla', 'bzurl')
         bzweb = bzweb.rstrip("/") + "/xmlrpc.cgi"
 
-        user = self.ui.config('bugzilla', 'user', 'bugs')
+        user = self.ui.config('bugzilla', 'user')
         passwd = self.ui.config('bugzilla', 'password')
 
         self.fixstatus = self.ui.config('bugzilla', 'fixstatus')
@@ -808,7 +811,7 @@
         matches = self.bzproxy.User.get({'match': [user],
                                          'token': self.bztoken})
         if not matches['users']:
-            user = self.ui.config('bugzilla', 'user', 'bugs')
+            user = self.ui.config('bugzilla', 'user')
             matches = self.bzproxy.User.get({'match': [user],
                                              'token': self.bztoken})
             if not matches['users']:
@@ -850,7 +853,7 @@
         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')
+        self.user = self.ui.config('bugzilla', 'user')
         self.passwd = self.ui.config('bugzilla', 'password')
         self.fixstatus = self.ui.config('bugzilla', 'fixstatus')
         self.fixresolution = self.ui.config('bugzilla', 'fixresolution')
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to