hgext/bugzilla.py
changeset 3646 b4ad640a3bcf
parent 3425 e4452c3fa736
child 3741 0897bf8d54c7
equal deleted inserted replaced
3645:b2c47652e8e3 3646:b4ad640a3bcf
    53 #   committer_email = bugzilla_user_name
    53 #   committer_email = bugzilla_user_name
    54 
    54 
    55 from mercurial.demandload import *
    55 from mercurial.demandload import *
    56 from mercurial.i18n import gettext as _
    56 from mercurial.i18n import gettext as _
    57 from mercurial.node import *
    57 from mercurial.node import *
    58 demandload(globals(), 'mercurial:templater,util os re time')
    58 demandload(globals(), 'mercurial:cmdutil,templater,util os re time')
    59 
    59 
    60 MySQLdb = None
    60 MySQLdb = None
    61 
    61 
    62 def buglist(ids):
    62 def buglist(ids):
    63     return '(' + ','.join(map(str, ids)) + ')'
    63     return '(' + ','.join(map(str, ids)) + ')'
   265                 count -= 1
   265                 count -= 1
   266             return root
   266             return root
   267 
   267 
   268         mapfile = self.ui.config('bugzilla', 'style')
   268         mapfile = self.ui.config('bugzilla', 'style')
   269         tmpl = self.ui.config('bugzilla', 'template')
   269         tmpl = self.ui.config('bugzilla', 'template')
   270         sio = templater.stringio()
   270         sio = cmdutil.stringio()
   271         t = templater.changeset_templater(self.ui, self.repo, mapfile, sio)
   271         t = cmdutil.changeset_templater(self.ui, self.repo, mapfile, sio)
   272         if not mapfile and not tmpl:
   272         if not mapfile and not tmpl:
   273             tmpl = _('changeset {node|short} in repo {root} refers '
   273             tmpl = _('changeset {node|short} in repo {root} refers '
   274                      'to bug {bug}.\ndetails:\n\t{desc|tabindent}')
   274                      'to bug {bug}.\ndetails:\n\t{desc|tabindent}')
   275         if tmpl:
   275         if tmpl:
   276             tmpl = templater.parsestring(tmpl, quoted=False)
   276             tmpl = templater.parsestring(tmpl, quoted=False)