323 class changeset_templater(changeset_printer): |
323 class changeset_templater(changeset_printer): |
324 '''format changeset information.''' |
324 '''format changeset information.''' |
325 |
325 |
326 def __init__(self, ui, repo, patch, brinfo, mapfile, buffered): |
326 def __init__(self, ui, repo, patch, brinfo, mapfile, buffered): |
327 changeset_printer.__init__(self, ui, repo, patch, brinfo, buffered) |
327 changeset_printer.__init__(self, ui, repo, patch, brinfo, buffered) |
328 self.t = templater.templater(mapfile, templater.common_filters, |
328 filters = templater.common_filters.copy() |
329 cache={'parent': '{rev}:{node|short} ', |
329 filters['formatnode'] = (ui.debugflag and (lambda x: x) |
330 'manifest': '{rev}:{node|short}', |
330 or (lambda x: x[:12])) |
331 'filecopy': '{name} ({source})'}) |
331 self.t = templater.templater(mapfile, filters, |
|
332 cache={ |
|
333 'parent': '{rev}:{node|formatnode} ', |
|
334 'manifest': '{rev}:{node|formatnode}', |
|
335 'filecopy': '{name} ({source})'}) |
332 |
336 |
333 def use_template(self, t): |
337 def use_template(self, t): |
334 '''set template string to use''' |
338 '''set template string to use''' |
335 self.t.cache['changeset'] = t |
339 self.t.cache['changeset'] = t |
336 |
340 |