# HG changeset patch # User Dirkjan Ochtman # Date 1257429660 -3600 # Node ID a235644a0b9358fc455d10ffa2285995833f846d # Parent 4d9dea174b84bb661abab6b04aef7f51c208e0a7 hgweb: use a tuple-list instead of dictionary for append-only store diff -r 4d9dea174b84 -r a235644a0b93 mercurial/hgweb/hgwebdir_mod.py --- 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