diff mercurial/hgweb/hgweb_mod.py @ 4346:c593e502f7fd

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Sun, 15 Apr 2007 18:42:38 -0500
parents aa26759c6fb3 26a2fa9433b8
children 69109aa0cddd
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Thu Apr 12 12:42:22 2007 -0500
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Apr 15 18:42:38 2007 -0500
@@ -703,7 +703,7 @@
                     # strip leading /
                     pi = pi[1:]
                     if pi:
-                        root = root[:-len(pi)]
+                        root = root[:root.rfind(root, pi)]
                     if req.env.has_key('REPO_NAME'):
                         rn = req.env['REPO_NAME'] + '/'
                         root += rn