Mercurial > hg
changeset 9723:a235644a0b93
hgweb: use a tuple-list instead of dictionary for append-only store
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 05 Nov 2009 15:01:00 +0100 |
parents | 4d9dea174b84 |
children | 40ef3bf3e04a |
files | mercurial/hgweb/hgwebdir_mod.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Thu Nov 05 15:19:54 2009 +0100 +++ b/mercurial/hgweb/hgwebdir_mod.py Thu Nov 05 15:01:00 2009 +0100 @@ -20,7 +20,7 @@ return [(util.pconvert(name).strip('/'), path) for name, path in items] def findrepos(paths): - repos = {} + repos = [] for prefix, root in cleannames(paths): roothead, roottail = os.path.split(root) # "foo = /bar/*" makes every subrepo of /bar/ to be @@ -30,7 +30,7 @@ try: recurse = {'*': False, '**': True}[roottail] except KeyError: - repos[prefix] = root + repos.append((prefix, root)) continue roothead = os.path.normpath(roothead) for path in util.walkrepos(roothead, followsym=True, recurse=recurse): @@ -38,8 +38,8 @@ name = util.pconvert(path[len(roothead):]).strip('/') if prefix: name = prefix + '/' + name - repos[name] = path - return repos.items() + repos.append((name, path)) + return repos class hgwebdir(object): refreshinterval = 20