Show More
@@ -221,31 +221,31 b' class hgwebdir(object):' | |||
|
221 | 221 | tmpl('error', error='%r not found' % fname)) |
|
222 | 222 | elif virtual: |
|
223 | 223 | repos = dict(self.repos) |
|
224 | # browse subdirectories | |
|
225 | subdir = virtual + '/' | |
|
226 | if [r for r in repos if r.startswith(subdir)]: | |
|
227 | makeindex(req, subdir) | |
|
228 | return | |
|
229 | ||
|
230 | 224 | while virtual: |
|
231 | 225 | real = repos.get(virtual) |
|
232 | 226 | if real: |
|
233 |
|
|
|
227 | req.env['REPO_NAME'] = virtual | |
|
228 | try: | |
|
229 | repo = hg.repository(parentui, real) | |
|
230 | hgweb(repo).run_wsgi(req) | |
|
231 | except IOError, inst: | |
|
232 | req.write(tmpl("error", error=inst.strerror)) | |
|
233 | except hg.RepoError, inst: | |
|
234 | req.write(tmpl("error", error=str(inst))) | |
|
235 | return | |
|
236 | ||
|
237 | # browse subdirectories | |
|
238 | subdir = virtual + '/' | |
|
239 | if [r for r in repos if r.startswith(subdir)]: | |
|
240 | makeindex(req, subdir) | |
|
241 | return | |
|
242 | ||
|
234 | 243 | up = virtual.rfind('/') |
|
235 | 244 | if up < 0: |
|
236 | 245 | break |
|
237 | 246 | virtual = virtual[:up] |
|
238 |
|
|
|
239 | req.env['REPO_NAME'] = virtual | |
|
240 | try: | |
|
241 | repo = hg.repository(parentui, real) | |
|
242 | hgweb(repo).run_wsgi(req) | |
|
243 | except IOError, inst: | |
|
244 | req.write(tmpl("error", error=inst.strerror)) | |
|
245 | except hg.RepoError, inst: | |
|
246 | req.write(tmpl("error", error=str(inst))) | |
|
247 | else: | |
|
248 | req.write(tmpl("notfound", repo=virtual)) | |
|
247 | ||
|
248 | req.write(tmpl("notfound", repo=virtual)) | |
|
249 | 249 | else: |
|
250 | 250 | if req.form.has_key('static'): |
|
251 | 251 | static = os.path.join(templater.templatepath(), "static") |
General Comments 0
You need to be logged in to leave comments.
Login now