comparison mercurial/formatter.py @ 36920:6ff6e1d6b5b8

templater: move stringify() to templateutil module As we have a util module, it doesn't make sense to import stringify() from templatefilters.py.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 08 Mar 2018 23:10:46 +0900
parents cafd0586876b
children 32f9b7e3f056
comparison
equal deleted inserted replaced
36919:8fba319750c2 36920:6ff6e1d6b5b8
122 error, 122 error,
123 pycompat, 123 pycompat,
124 templatefilters, 124 templatefilters,
125 templatekw, 125 templatekw,
126 templater, 126 templater,
127 templateutil,
127 util, 128 util,
128 ) 129 )
129 from .utils import dateutil 130 from .utils import dateutil
130 131
131 pickle = util.pickle 132 pickle = util.pickle
401 # but template resources must be always available 402 # but template resources must be always available
402 props['repo'] = props['ctx'].repo() 403 props['repo'] = props['ctx'].repo()
403 props['revcache'] = {} 404 props['revcache'] = {}
404 props = pycompat.strkwargs(props) 405 props = pycompat.strkwargs(props)
405 g = self._t(ref, **props) 406 g = self._t(ref, **props)
406 self._out.write(templater.stringify(g)) 407 self._out.write(templateutil.stringify(g))
407 408
408 def end(self): 409 def end(self):
409 baseformatter.end(self) 410 baseformatter.end(self)
410 self._renderitem('docfooter', {}) 411 self._renderitem('docfooter', {})
411 412