zeroconf: handle string hgweb config args
authorMatt Mackall <mpm@selenic.com>
Mon, 26 Apr 2010 11:03:40 -0500
changeset 11005 c9b4e9431af7
parent 11004 7bb10d3dbcd6
child 11006 6d9ff3374a81
zeroconf: handle string hgweb config args
hgext/zeroconf/__init__.py
--- a/hgext/zeroconf/__init__.py	Mon Apr 26 11:03:40 2010 -0500
+++ b/hgext/zeroconf/__init__.py	Mon Apr 26 11:03:40 2010 -0500
@@ -98,12 +98,13 @@
     server.registerService(svc)
 
 class hgwebzc(hgweb_mod.hgweb):
-    def __init__(self, repo, name=None):
-        super(hgwebzc, self).__init__(repo, name)
-        name = self.reponame or os.path.basename(repo.root)
+    def __init__(self, repo, name=None, baseui=None):
+        super(hgwebzc, self).__init__(repo, name=name, baseui=baseui)
+        name = self.reponame or os.path.basename(self.repo.root)
         path = self.repo.ui.config("web", "prefix", "").strip('/')
         desc = self.repo.ui.config("web", "description", name)
-        publish(name, desc, path, int(repo.ui.config("web", "port", 8000)))
+        publish(name, desc, path,
+                int(self.repo.ui.config("web", "port", 8000)))
 
 class hgwebdirzc(hgwebdir_mod.hgwebdir):
     def __init__(self, conf, baseui=None):