Show More
@@ -267,20 +267,22 class bugzilla(object): | |||||
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 = cmdutil.stringio() |
|
270 | t = cmdutil.changeset_templater(self.ui, self.repo, | |
271 | t = cmdutil.changeset_templater(self.ui, self.repo, mapfile, sio) |
|
271 | False, None, mapfile, False) | |
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) | |
277 | t.use_template(tmpl) |
|
277 | t.use_template(tmpl) | |
|
278 | self.ui.pushbuffer() | |||
278 | t.show(changenode=node, changes=changes, |
|
279 | t.show(changenode=node, changes=changes, | |
279 | bug=str(bugid), |
|
280 | bug=str(bugid), | |
280 | hgweb=self.ui.config('web', 'baseurl'), |
|
281 | hgweb=self.ui.config('web', 'baseurl'), | |
281 | root=self.repo.root, |
|
282 | root=self.repo.root, | |
282 | webroot=webroot(self.repo.root)) |
|
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 | def hook(ui, repo, hooktype, node=None, **kwargs): |
|
287 | def hook(ui, repo, hooktype, node=None, **kwargs): | |
286 | '''add comment to bugzilla for each changeset that refers to a |
|
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