hgext/bugzilla.py
changeset 3741 0897bf8d54c7
parent 3643 b4ad640a3bcf
child 3876 1e0b94cfba0e
--- a/hgext/bugzilla.py	Fri Dec 01 01:29:13 2006 -0600
+++ b/hgext/bugzilla.py	Fri Dec 01 01:29:14 2006 -0600
@@ -267,20 +267,22 @@
 
         mapfile = self.ui.config('bugzilla', 'style')
         tmpl = self.ui.config('bugzilla', 'template')
-        sio = cmdutil.stringio()
-        t = cmdutil.changeset_templater(self.ui, self.repo, mapfile, sio)
+        t = cmdutil.changeset_templater(self.ui, self.repo,
+                                        False, None, mapfile, False)
         if not mapfile and not tmpl:
             tmpl = _('changeset {node|short} in repo {root} refers '
                      'to bug {bug}.\ndetails:\n\t{desc|tabindent}')
         if tmpl:
             tmpl = templater.parsestring(tmpl, quoted=False)
             t.use_template(tmpl)
+        self.ui.pushbuffer()
         t.show(changenode=node, changes=changes,
                bug=str(bugid),
                hgweb=self.ui.config('web', 'baseurl'),
                root=self.repo.root,
                webroot=webroot(self.repo.root))
-        self.add_comment(bugid, sio.getvalue(), templater.email(changes[1]))
+        data = self.ui.popbuffer()
+        self.add_comment(bugid, data, templater.email(changes[1]))
 
 def hook(ui, repo, hooktype, node=None, **kwargs):
     '''add comment to bugzilla for each changeset that refers to a