# HG changeset patch # User Yuya Nishihara # Date 1542449505 -32400 # Node ID 2cd5f1fac78802fcc56fc460357e16c6736c3eb5 # Parent 0800d9e6e216b2ca59f05788b288685b8d7b2d93 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(). diff -r 0800d9e6e216 -r 2cd5f1fac788 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sat Nov 24 14:11:02 2018 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Sat Nov 17 19:11:45 2018 +0900 @@ -22,6 +22,7 @@ from .. import ( encoding, error, + extensions, formatter, hg, hook, @@ -212,6 +213,7 @@ u = baseui.copy() else: u = uimod.ui.load() + extensions.loadall(u) r = hg.repository(u, repo) else: # we trust caller to give us a private copy diff -r 0800d9e6e216 -r 2cd5f1fac788 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Sat Nov 24 14:11:02 2018 -0500 +++ b/mercurial/hgweb/hgwebdir_mod.py Sat Nov 17 19:11:45 2018 +0900 @@ -30,6 +30,7 @@ configitems, encoding, error, + extensions, hg, profiling, pycompat, @@ -268,6 +269,9 @@ self.lastrefresh = 0 self.motd = None self.refresh() + if not baseui: + # set up environment for new ui + extensions.loadall(self.ui) def refresh(self): if self.ui: