##// END OF EJS Templates
templater: drop deprecated handling of KeyError from changeset_templater...
Yuya Nishihara -
r28837:d54a7410 default
parent child Browse files
Show More
@@ -1532,29 +1532,25 b' class changeset_templater(changeset_prin'
1532 props['revcache'] = {'copies': copies}
1532 props['revcache'] = {'copies': copies}
1533 props['cache'] = self.cache
1533 props['cache'] = self.cache
1534
1534
1535 try:
1535 # write header
1536 # write header
1536 if self._parts['header']:
1537 if self._parts['header']:
1537 h = templater.stringify(self.t(self._parts['header'], **props))
1538 h = templater.stringify(self.t(self._parts['header'], **props))
1538 if self.buffered:
1539 if self.buffered:
1539 self.header[ctx.rev()] = h
1540 self.header[ctx.rev()] = h
1540 else:
1541 else:
1541 if self.lastheader != h:
1542 if self.lastheader != h:
1542 self.lastheader = h
1543 self.lastheader = h
1543 self.ui.write(h)
1544 self.ui.write(h)
1544
1545
1545 # write changeset metadata, then patch if requested
1546 # write changeset metadata, then patch if requested
1546 key = self._parts['changeset']
1547 key = self._parts['changeset']
1547 self.ui.write(templater.stringify(self.t(key, **props)))
1548 self.ui.write(templater.stringify(self.t(key, **props)))
1548 self.showpatch(ctx, matchfn)
1549 self.showpatch(ctx, matchfn)
1549
1550
1550 if self._parts['footer']:
1551 if self._parts['footer']:
1551 if not self.footer:
1552 if not self.footer:
1552 self.footer = templater.stringify(
1553 self.footer = templater.stringify(
1553 self.t(self._parts['footer'], **props))
1554 self.t(self._parts['footer'], **props))
1555 except KeyError as inst:
1556 msg = _("%s: no key named '%s'")
1557 raise error.Abort(msg % (self.t.mapfile, inst.args[0]))
1558
1554
1559 def gettemplate(ui, tmpl, style):
1555 def gettemplate(ui, tmpl, style):
1560 """
1556 """
@@ -956,7 +956,6 b' class templater(object):'
956 defaults = {}
956 defaults = {}
957 if cache is None:
957 if cache is None:
958 cache = {}
958 cache = {}
959 self.mapfile = mapfile or 'template'
960 self.cache = cache.copy()
959 self.cache = cache.copy()
961 self.map = {}
960 self.map = {}
962 if mapfile:
961 if mapfile:
General Comments 0
You need to be logged in to leave comments. Login now