comparison mercurial/hgweb/hgweb_mod.py @ 40728:2cd5f1fac788

hgweb: load globally-enabled extensions explicitly Before, extensions were loaded as a side effect of hg.repository() if the hgweb was executed as a CGI/WSGI. I want to make it explicit so that another ui hook can be inserted after extensions.loadall().
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Nov 2018 19:11:45 +0900
parents b63dee7bd0d9
children c93d046d4300
comparison
equal deleted inserted replaced
40722:0800d9e6e216 40728:2cd5f1fac788
20 ) 20 )
21 21
22 from .. import ( 22 from .. import (
23 encoding, 23 encoding,
24 error, 24 error,
25 extensions,
25 formatter, 26 formatter,
26 hg, 27 hg,
27 hook, 28 hook,
28 profiling, 29 profiling,
29 pycompat, 30 pycompat,
210 if isinstance(repo, bytes): 211 if isinstance(repo, bytes):
211 if baseui: 212 if baseui:
212 u = baseui.copy() 213 u = baseui.copy()
213 else: 214 else:
214 u = uimod.ui.load() 215 u = uimod.ui.load()
216 extensions.loadall(u)
215 r = hg.repository(u, repo) 217 r = hg.repository(u, repo)
216 else: 218 else:
217 # we trust caller to give us a private copy 219 # we trust caller to give us a private copy
218 r = repo 220 r = repo
219 221