Do not sort hgwebdir repositories if python list or tuple is given.
authorThomas Arendsen Hein <thomas@intevation.de>
Tue, 19 Aug 2008 18:17:11 +0200
changeset 6908 b77c25c2d6c0
parent 6907 6dcbe191a9b5
child 6909 b5a6fce0bc29
Do not sort hgwebdir repositories if python list or tuple is given. This was introduced by changeset f67d1468ac50 (util: add sort helper)
mercurial/hgweb/hgwebdir_mod.py
--- 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