# HG changeset patch # User Brendan Cully # Date 2007-07-06 02:56:16 # Node ID 496ac05c6a313933d96b7ed5905adb0198761ac8 # Parent d39776752a1f37ef4ac59681c2e1010b8a34941a hgwebdir: show only trailing part of path when browsing subdirectories diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -140,6 +140,7 @@ class hgwebdir(object): 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 @@ class hgwebdir(object): 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