Do not sort hgwebdir repositories if python list or tuple is given.
This was introduced by changeset f67d1468ac50 (util: add sort helper)
--- a/mercurial/hgweb/hgwebdir_mod.py Mon Aug 18 16:50:36 2008 -0500
+++ b/mercurial/hgweb/hgwebdir_mod.py Tue Aug 19 18:17:11 2008 +0200
@@ -19,8 +19,8 @@
class hgwebdir(object):
def __init__(self, config, parentui=None):
def cleannames(items):
- return util.sort([(util.pconvert(name).strip('/'), path)
- for name, path in items])
+ return [(util.pconvert(name).strip('/'), path)
+ for name, path in items]
self.parentui = parentui or ui.ui(report_untrusted=False,
interactive = False)
@@ -33,7 +33,7 @@
self.repos = cleannames(config)
self.repos_sorted = ('', False)
elif isinstance(config, dict):
- self.repos = cleannames(config.items())
+ self.repos = util.sort(cleannames(config.items()))
else:
if isinstance(config, util.configparser):
cp = config