mercurial/templater.py
changeset 32873 2ecce24dfcd3
parent 32684 af854b1b36f8
child 32970 11c0bb4ccc76
equal deleted inserted replaced
32872:9fcb6df413c9 32873:2ecce24dfcd3
  1296             except IOError as inst:
  1296             except IOError as inst:
  1297                 raise IOError(inst.args[0], _('template file %s: %s') %
  1297                 raise IOError(inst.args[0], _('template file %s: %s') %
  1298                               (self.map[t][1], inst.args[1]))
  1298                               (self.map[t][1], inst.args[1]))
  1299         return self.cache[t]
  1299         return self.cache[t]
  1300 
  1300 
       
  1301     def render(self, mapping):
       
  1302         """Render the default unnamed template and return result as string"""
       
  1303         return stringify(self('', **mapping))
       
  1304 
  1301     def __call__(self, t, **mapping):
  1305     def __call__(self, t, **mapping):
  1302         ttype = t in self.map and self.map[t][0] or 'default'
  1306         ttype = t in self.map and self.map[t][0] or 'default'
  1303         if ttype not in self.ecache:
  1307         if ttype not in self.ecache:
  1304             try:
  1308             try:
  1305                 ecls = engines[ttype]
  1309                 ecls = engines[ttype]