##// END OF EJS Templates
update bugzilla extension to use ui buffers
Matt Mackall -
r3741:0897bf8d default
parent child Browse files
Show More
@@ -267,20 +267,22 b' class bugzilla(object):'
267 267
268 268 mapfile = self.ui.config('bugzilla', 'style')
269 269 tmpl = self.ui.config('bugzilla', 'template')
270 sio = cmdutil.stringio()
271 t = cmdutil.changeset_templater(self.ui, self.repo, mapfile, sio)
270 t = cmdutil.changeset_templater(self.ui, self.repo,
271 False, None, mapfile, False)
272 272 if not mapfile and not tmpl:
273 273 tmpl = _('changeset {node|short} in repo {root} refers '
274 274 'to bug {bug}.\ndetails:\n\t{desc|tabindent}')
275 275 if tmpl:
276 276 tmpl = templater.parsestring(tmpl, quoted=False)
277 277 t.use_template(tmpl)
278 self.ui.pushbuffer()
278 279 t.show(changenode=node, changes=changes,
279 280 bug=str(bugid),
280 281 hgweb=self.ui.config('web', 'baseurl'),
281 282 root=self.repo.root,
282 283 webroot=webroot(self.repo.root))
283 self.add_comment(bugid, sio.getvalue(), templater.email(changes[1]))
284 data = self.ui.popbuffer()
285 self.add_comment(bugid, data, templater.email(changes[1]))
284 286
285 287 def hook(ui, repo, hooktype, node=None, **kwargs):
286 288 '''add comment to bugzilla for each changeset that refers to a
General Comments 0
You need to be logged in to leave comments. Login now