Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/hgwebdir_mod.py @ 3263:3207e30bf468
hgweb: support for generating and parsing NWI URLs
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 04 Oct 2006 17:04:40 -0700 |
parents | 1e322b44b366 |
children | db9d2a624521 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Wed Oct 04 17:04:40 2006 -0700 +++ b/mercurial/hgweb/hgwebdir_mod.py Wed Oct 04 17:04:40 2006 -0700 @@ -143,7 +143,12 @@ yield row virtual = req.env.get("PATH_INFO", "").strip('/') - if virtual: + if virtual.startswith('static/'): + static = os.path.join(templater.templatepath(), 'static') + fname = virtual[7:] + req.write(staticfile(static, fname, req) or + tmpl('error', error='%r not found' % fname)) + elif virtual: while virtual: real = dict(self.repos).get(virtual) if real: