hgext/bugzilla.py
branchstable
changeset 49366 288de6f5d724
parent 48946 642e31cb55f0
child 50928 d718eddf01d9
equal deleted inserted replaced
49364:e8ea403b1c46 49366:288de6f5d724
   289     http://my-project.org/hg/repository-name/rev/3b16791d6642
   289     http://my-project.org/hg/repository-name/rev/3b16791d6642
   290 
   290 
   291     Changeset commit comment. Bug 1234.
   291     Changeset commit comment. Bug 1234.
   292 '''
   292 '''
   293 
   293 
   294 from __future__ import absolute_import
       
   295 
   294 
   296 import json
   295 import json
   297 import re
   296 import re
   298 import time
   297 import time
   299 
   298 
   433     b'version',
   432     b'version',
   434     default=None,
   433     default=None,
   435 )
   434 )
   436 
   435 
   437 
   436 
   438 class bzaccess(object):
   437 class bzaccess:
   439     '''Base class for access to Bugzilla.'''
   438     '''Base class for access to Bugzilla.'''
   440 
   439 
   441     def __init__(self, ui):
   440     def __init__(self, ui):
   442         self.ui = ui
   441         self.ui = ui
   443         usermap = self.ui.config(b'bugzilla', b'usermap')
   442         usermap = self.ui.config(b'bugzilla', b'usermap')
   689 
   688 
   690 
   689 
   691 # Bugzilla via XMLRPC interface.
   690 # Bugzilla via XMLRPC interface.
   692 
   691 
   693 
   692 
   694 class cookietransportrequest(object):
   693 class cookietransportrequest:
   695     """A Transport request method that retains cookies over its lifetime.
   694     """A Transport request method that retains cookies over its lifetime.
   696 
   695 
   697     The regular xmlrpclib transports ignore cookies. Which causes
   696     The regular xmlrpclib transports ignore cookies. Which causes
   698     a bit of a problem when you need a cookie-based login, as with
   697     a bit of a problem when you need a cookie-based login, as with
   699     the Bugzilla XMLRPC interface prior to 4.4.3.
   698     the Bugzilla XMLRPC interface prior to 4.4.3.
  1094         emails automatically.
  1093         emails automatically.
  1095         """
  1094         """
  1096         pass
  1095         pass
  1097 
  1096 
  1098 
  1097 
  1099 class bugzilla(object):
  1098 class bugzilla:
  1100     # supported versions of bugzilla. different versions have
  1099     # supported versions of bugzilla. different versions have
  1101     # different schemas.
  1100     # different schemas.
  1102     _versions = {
  1101     _versions = {
  1103         b'2.16': bzmysql,
  1102         b'2.16': bzmysql,
  1104         b'2.18': bzmysql_2_18,
  1103         b'2.18': bzmysql_2_18,