Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webcommands.py @ 7102:14f3ea2ea54f
hgweb: cleanup the manifest generation
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 15 Oct 2008 21:50:47 +0200 |
parents | 20a5dd5d6dd9 |
children | 125c8fedcbe0 |
comparison
equal
deleted
inserted
replaced
7100:baf12d52add4 | 7102:14f3ea2ea54f |
---|---|
274 | 274 |
275 for f, n in mf.items(): | 275 for f, n in mf.items(): |
276 if f[:l] != path: | 276 if f[:l] != path: |
277 continue | 277 continue |
278 remain = f[l:] | 278 remain = f[l:] |
279 if "/" in remain: | 279 idx = remain.find('/') |
280 short = remain[:remain.index("/") + 1] # bleah | 280 if idx != -1: |
281 files[short] = (f, None) | 281 remain = remain[:idx+1] |
282 else: | 282 n = None |
283 short = os.path.basename(remain) | 283 files[remain] = (f, n) |
284 files[short] = (f, n) | |
285 | 284 |
286 if not files: | 285 if not files: |
287 raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path) | 286 raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path) |
288 | 287 |
289 def filelist(**map): | 288 def filelist(**map): |