Mercurial > hg
changeset 7103:7a19053e4bfc
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 15 Oct 2008 23:27:35 +0200 |
parents | 14f3ea2ea54f (diff) e786192d995d (current diff) |
children | 9514cbb6e4f6 |
files | |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Wed Oct 15 20:14:28 2008 +0200 +++ b/mercurial/hgweb/webcommands.py Wed Oct 15 23:27:35 2008 +0200 @@ -276,12 +276,11 @@ if f[:l] != path: continue remain = f[l:] - if "/" in remain: - short = remain[:remain.index("/") + 1] # bleah - files[short] = (f, None) - else: - short = os.path.basename(remain) - files[short] = (f, n) + idx = remain.find('/') + if idx != -1: + remain = remain[:idx+1] + n = None + files[remain] = (f, n) if not files: raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path)