Show More
@@ -123,7 +123,7 b' def wrapname(name, wrapper):' | |||||
123 | funcs = '''os.path.join os.path.split os.path.splitext |
|
123 | funcs = '''os.path.join os.path.split os.path.splitext | |
124 | os.path.splitunc os.path.normpath os.path.normcase os.makedirs |
|
124 | os.path.splitunc os.path.normpath os.path.normcase os.makedirs | |
125 | mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase |
|
125 | mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase | |
126 |
mercurial.util.fspath mercurial. |
|
126 | mercurial.util.fspath mercurial.util.pconvert''' | |
127 |
|
127 | |||
128 | # codec and alias names of sjis and big5 to be faked. |
|
128 | # codec and alias names of sjis and big5 to be faked. | |
129 | problematic_encodings = '''big5 big5-tw csbig5 big5hkscs big5-hkscs |
|
129 | problematic_encodings = '''big5 big5-tw csbig5 big5hkscs big5-hkscs |
@@ -101,17 +101,20 b' class hgwebzc(hgweb_mod.hgweb):' | |||||
101 | def __init__(self, repo, name=None): |
|
101 | def __init__(self, repo, name=None): | |
102 | super(hgwebzc, self).__init__(repo, name) |
|
102 | super(hgwebzc, self).__init__(repo, name) | |
103 | name = self.reponame or os.path.basename(repo.root) |
|
103 | name = self.reponame or os.path.basename(repo.root) | |
|
104 | path = self.repo.ui.config("web", "prefix", "").strip('/') | |||
104 | desc = self.repo.ui.config("web", "description", name) |
|
105 | desc = self.repo.ui.config("web", "description", name) | |
105 |
publish(name, desc, |
|
106 | publish(name, desc, path, int(repo.ui.config("web", "port", 8000))) | |
106 |
|
107 | |||
107 | class hgwebdirzc(hgwebdir_mod.hgwebdir): |
|
108 | class hgwebdirzc(hgwebdir_mod.hgwebdir): | |
108 | def run(self): |
|
109 | def __init__(self, conf, baseui=None): | |
|
110 | super(hgwebdirzc, self).__init__(conf, baseui) | |||
|
111 | prefix = self.ui.config("web", "prefix", "").strip('/') + '/' | |||
109 | for r, p in self.repos: |
|
112 | for r, p in self.repos: | |
110 | u = self.ui.copy() |
|
113 | u = self.ui.copy() | |
111 | u.readconfig(os.path.join(p, '.hg', 'hgrc')) |
|
114 | u.readconfig(os.path.join(p, '.hg', 'hgrc')) | |
112 | n = os.path.basename(r) |
|
115 | n = os.path.basename(r) | |
113 | publish(n, "hgweb", p, int(u.config("web", "port", 8000))) |
|
116 | path = (prefix + r).strip('/') | |
114 | return super(hgwebdirzc, self).run() |
|
117 | publish(n, "hgweb", path, int(u.config("web", "port", 8000))) | |
115 |
|
118 | |||
116 | # listen |
|
119 | # listen | |
117 |
|
120 |
General Comments 0
You need to be logged in to leave comments.
Login now