mercurial/logcmdutil.py
changeset 45265 dfb67cd1da7f
parent 44823 3b7aabd02e11
child 45266 215f08c8006c
equal deleted inserted replaced
45264:8cce9f77ca73 45265:dfb67cd1da7f
   601             if not self.footer:
   601             if not self.footer:
   602                 self.footer = self.t.render(self._parts[b'footer'], props)
   602                 self.footer = self.t.render(self._parts[b'footer'], props)
   603 
   603 
   604 
   604 
   605 def templatespec(tmpl, mapfile):
   605 def templatespec(tmpl, mapfile):
   606     if pycompat.ispy3:
   606     assert not (tmpl and mapfile)
   607         assert not isinstance(tmpl, str), b'tmpl must not be a str'
       
   608     if mapfile:
   607     if mapfile:
   609         return formatter.templatespec(b'changeset', tmpl, mapfile)
   608         return formatter.mapfile_templatespec(b'changeset', mapfile)
   610     else:
   609     else:
   611         return formatter.templatespec(b'', tmpl, None)
   610         if pycompat.ispy3:
       
   611             assert not isinstance(tmpl, str), b'tmpl must not be a str'
       
   612         return formatter.literal_templatespec(tmpl)
   612 
   613 
   613 
   614 
   614 def _lookuptemplate(ui, tmpl, style):
   615 def _lookuptemplate(ui, tmpl, style):
   615     """Find the template matching the given template spec or style
   616     """Find the template matching the given template spec or style
   616 
   617