Commits

Yuya Nishihara  committed dc9f3fb

update note about loading order

  • Participants
  • Parent commits 301ce70

Comments (0)

Files changed (1)

File hgext/webuserdir.py

 /home/foo/public_hg/bar, as http://hg.example.org/baz is to
 /srv/hgrepos/baz.
 
-NOTE: Currently hgwebdir DOES NOT LOAD EXTENSIONS CORRECTLY.
-So you need to edit hgwebdir_mod.py to call extensions.loadall(self.ui).
-This should be fixed by another patch.
+NOTE: You need to load this extension BEFORE instantiating hgwebdir
+application. For example::
 
-See http://www.selenic.com/pipermail/mercurial-devel/2009-September/015185.html
-and http://mercurial.selenic.com/bts/issue1824 for details.
+    from mercurial import extensions, hgweb, ui as uimod
+    ui = uimod.ui()
+    ui.readconfig('hgwebdir.config', trust=True)
+    extensions.loadall(ui)
+    application = hgweb.hgwebdir('hgwebdir.config', baseui=ui)
 """
 
 import os, pwd, re