changeset 3741:0897bf8d54c7

update bugzilla extension to use ui buffers
author Matt Mackall <mpm@selenic.com>
date Fri, 01 Dec 2006 01:29:14 -0600
parents aef384dbc731
children 86c1d1d35593
files hgext/bugzilla.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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