1647 if not self.footer: |
1647 if not self.footer: |
1648 self.footer = templater.stringify( |
1648 self.footer = templater.stringify( |
1649 self.t(self._parts['footer'], **props)) |
1649 self.t(self._parts['footer'], **props)) |
1650 |
1650 |
1651 def logtemplatespec(tmpl, mapfile): |
1651 def logtemplatespec(tmpl, mapfile): |
1652 return formatter.templatespec('changeset', tmpl, mapfile) |
1652 if mapfile: |
|
1653 return formatter.templatespec('changeset', tmpl, mapfile) |
|
1654 else: |
|
1655 return formatter.templatespec('', tmpl, None) |
1653 |
1656 |
1654 def _lookuplogtemplate(ui, tmpl, style): |
1657 def _lookuplogtemplate(ui, tmpl, style): |
1655 """Find the template matching the given template spec or style |
1658 """Find the template matching the given template spec or style |
1656 |
1659 |
1657 See formatter.lookuptemplate() for details. |
1660 See formatter.lookuptemplate() for details. |
1704 if opts.get('template') == 'json': |
1707 if opts.get('template') == 'json': |
1705 return jsonchangeset(ui, repo, matchfn, opts, buffered) |
1708 return jsonchangeset(ui, repo, matchfn, opts, buffered) |
1706 |
1709 |
1707 spec = _lookuplogtemplate(ui, opts.get('template'), opts.get('style')) |
1710 spec = _lookuplogtemplate(ui, opts.get('template'), opts.get('style')) |
1708 |
1711 |
1709 if not spec.tmpl and not spec.mapfile: |
1712 if not spec.ref and not spec.tmpl and not spec.mapfile: |
1710 return changeset_printer(ui, repo, matchfn, opts, buffered) |
1713 return changeset_printer(ui, repo, matchfn, opts, buffered) |
1711 |
1714 |
1712 return changeset_templater(ui, repo, spec, matchfn, opts, buffered) |
1715 return changeset_templater(ui, repo, spec, matchfn, opts, buffered) |
1713 |
1716 |
1714 def showmarker(fm, marker, index=None): |
1717 def showmarker(fm, marker, index=None): |