Mercurial > hg > mercurial-source
diff mercurial/hgweb/hgwebdir_mod.py @ 4828:496ac05c6a31
hgwebdir: show only trailing part of path when browsing subdirectories
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 05 Jul 2007 19:56:16 -0700 |
parents | 9b0ebb5e0f94 |
children | 4f86c58c6c56 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -140,6 +140,7 @@ for name, path in self.repos: if not name.startswith(subdir): continue + name = name[len(subdir):] u = ui.ui(parentui=parentui) try: @@ -152,7 +153,7 @@ if u.configbool("web", "hidden", untrusted=True): continue - url = ('/'.join([req.env["REQUEST_URI"].split('?')[0], name[len(subdir):]]) + url = ('/'.join([req.env["REQUEST_URI"].split('?')[0], name]) .replace("//", "/")) + '/' # update time with local timezone