##// END OF EJS Templates
Last change broke new-style URLs
Brendan Cully -
r4846:40007fe8 default
parent child Browse files
Show More
@@ -220,7 +220,15 b' class hgwebdir(object):'
220 req.write(staticfile(static, fname, req) or
220 req.write(staticfile(static, fname, req) or
221 tmpl('error', error='%r not found' % fname))
221 tmpl('error', error='%r not found' % fname))
222 elif virtual:
222 elif virtual:
223 if virtual in dict(self.repos):
223 while virtual:
224 real = dict(self.repos).get(virtual)
225 if real:
226 break
227 up = virtual.rfind('/')
228 if up < 0:
229 break
230 virtual = virtual[:up]
231 if real:
224 req.env['REPO_NAME'] = virtual
232 req.env['REPO_NAME'] = virtual
225 try:
233 try:
226 repo = hg.repository(parentui, real)
234 repo = hg.repository(parentui, real)
@@ -230,7 +238,7 b' class hgwebdir(object):'
230 except hg.RepoError, inst:
238 except hg.RepoError, inst:
231 req.write(tmpl("error", error=str(inst)))
239 req.write(tmpl("error", error=str(inst)))
232 else:
240 else:
233 subdir=virtual + '/'
241 subdir=req.env.get("PATH_INFO", "").strip('/') + '/'
234 if [r for r in self.repos if r[0].startswith(subdir)]:
242 if [r for r in self.repos if r[0].startswith(subdir)]:
235 makeindex(req, subdir)
243 makeindex(req, subdir)
236 else:
244 else:
General Comments 0
You need to be logged in to leave comments. Login now