diff mercurial/hgweb/hgwebdir_mod.py @ 8136:6b5522cb2ad2

ui: refactor option setting No more passing options as constructor keywords. Basic options are now always stored in the overlay for simplicity and consistency.
author Matt Mackall <mpm@selenic.com>
date Thu, 23 Apr 2009 15:40:10 -0500
parents aa983c3d94a9
children 6fc30fe7f3e7
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Apr 23 15:40:10 2009 -0500
+++ b/mercurial/hgweb/hgwebdir_mod.py	Thu Apr 23 15:40:10 2009 -0500
@@ -21,8 +21,13 @@
             return [(util.pconvert(name).strip('/'), path)
                     for name, path in items]
 
-        self.parentui = parentui or ui.ui(report_untrusted=False,
-                                          interactive = False)
+        if parentui:
+           self.parentui = parentui
+        else:
+            self.parentui = ui.ui()
+            self.parentui.setconfig('ui', 'report_untrusted', 'off')
+            self.parentui.setconfig('ui', 'interactive', 'off')
+
         self.motd = None
         self.style = 'paper'
         self.stripecount = None