comparison mercurial/hgweb/webcommands.py @ 30559:d83ca854fa21

ui: factor out ui.load() to create a ui without loading configs (API) This allows us to write doctests depending on a ui object, but not on global configs. ui.load() is a class method so we can do wsgiui.load(). All ui() calls but for doctests are replaced with ui.load(). Some of them could be changed to not load configs later.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 22 Oct 2016 14:35:10 +0900
parents 4ed8bb8a153f
children b9e49f7b0220
comparison
equal deleted inserted replaced
30557:cbeb54ec0481 30559:d83ca854fa21
1300 }) 1300 })
1301 1301
1302 return tmpl('helptopics', topics=topics, title=topicname, 1302 return tmpl('helptopics', topics=topics, title=topicname,
1303 subindex=True) 1303 subindex=True)
1304 1304
1305 u = webutil.wsgiui() 1305 u = webutil.wsgiui.load()
1306 u.verbose = True 1306 u.verbose = True
1307 1307
1308 # Render a page from a sub-topic. 1308 # Render a page from a sub-topic.
1309 if '.' in topicname: 1309 if '.' in topicname:
1310 # TODO implement support for rendering sections, like 1310 # TODO implement support for rendering sections, like