--- a/mercurial/formatter.py Sun Apr 29 15:52:01 2018 +0900
+++ b/mercurial/formatter.py Thu May 03 15:08:16 2018 +0900
@@ -107,7 +107,6 @@
from __future__ import absolute_import, print_function
-import collections
import contextlib
import itertools
import os
@@ -117,6 +116,9 @@
hex,
short,
)
+from .thirdparty import (
+ attr,
+)
from . import (
error,
@@ -413,8 +415,11 @@
baseformatter.end(self)
self._renderitem('docfooter', {})
-templatespec = collections.namedtuple(r'templatespec',
- r'ref tmpl mapfile')
+@attr.s(frozen=True)
+class templatespec(object):
+ ref = attr.ib()
+ tmpl = attr.ib()
+ mapfile = attr.ib()
def lookuptemplate(ui, topic, tmpl):
"""Find the template matching the given -T/--template spec 'tmpl'