diff mercurial/hgweb/hgweb_mod.py @ 40762: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
line wrap: on
line diff
--- 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