hgext/zeroconf/__init__.py
changeset 11005 c9b4e9431af7
parent 10993 c1b43d786889
child 11340 938fefb57db5
equal deleted inserted replaced
11004:7bb10d3dbcd6 11005:c9b4e9431af7
    96                                              'path': "/" + path},
    96                                              'path': "/" + path},
    97                                address = localip, weight = 0, priority = 0)
    97                                address = localip, weight = 0, priority = 0)
    98     server.registerService(svc)
    98     server.registerService(svc)
    99 
    99 
   100 class hgwebzc(hgweb_mod.hgweb):
   100 class hgwebzc(hgweb_mod.hgweb):
   101     def __init__(self, repo, name=None):
   101     def __init__(self, repo, name=None, baseui=None):
   102         super(hgwebzc, self).__init__(repo, name)
   102         super(hgwebzc, self).__init__(repo, name=name, baseui=baseui)
   103         name = self.reponame or os.path.basename(repo.root)
   103         name = self.reponame or os.path.basename(self.repo.root)
   104         path = self.repo.ui.config("web", "prefix", "").strip('/')
   104         path = self.repo.ui.config("web", "prefix", "").strip('/')
   105         desc = self.repo.ui.config("web", "description", name)
   105         desc = self.repo.ui.config("web", "description", name)
   106         publish(name, desc, path, int(repo.ui.config("web", "port", 8000)))
   106         publish(name, desc, path,
       
   107                 int(self.repo.ui.config("web", "port", 8000)))
   107 
   108 
   108 class hgwebdirzc(hgwebdir_mod.hgwebdir):
   109 class hgwebdirzc(hgwebdir_mod.hgwebdir):
   109     def __init__(self, conf, baseui=None):
   110     def __init__(self, conf, baseui=None):
   110         super(hgwebdirzc, self).__init__(conf, baseui=baseui)
   111         super(hgwebdirzc, self).__init__(conf, baseui=baseui)
   111         prefix = self.ui.config("web", "prefix", "").strip('/') + '/'
   112         prefix = self.ui.config("web", "prefix", "").strip('/') + '/'