comparison mercurial/hgweb/hgweb_mod.py @ 36926: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 f0a851542a05
children de117f579431
comparison
equal deleted inserted replaced
36925:8fba319750c2 36926:6ff6e1d6b5b8
28 profiling, 28 profiling,
29 pycompat, 29 pycompat,
30 repoview, 30 repoview,
31 templatefilters, 31 templatefilters,
32 templater, 32 templater,
33 templateutil,
33 ui as uimod, 34 ui as uimod,
34 util, 35 util,
35 wireprotoserver, 36 wireprotoserver,
36 ) 37 )
37 38
376 # process the web interface request 377 # process the web interface request
377 378
378 try: 379 try:
379 rctx.tmpl = rctx.templater(req) 380 rctx.tmpl = rctx.templater(req)
380 ctype = rctx.tmpl('mimetype', encoding=encoding.encoding) 381 ctype = rctx.tmpl('mimetype', encoding=encoding.encoding)
381 ctype = templater.stringify(ctype) 382 ctype = templateutil.stringify(ctype)
382 383
383 # check read permissions non-static content 384 # check read permissions non-static content
384 if cmd != 'static': 385 if cmd != 'static':
385 self.check_perm(rctx, req, None) 386 self.check_perm(rctx, req, None)
386 387