comparison mercurial/hgweb/hgwebdir_mod.py @ 8209:a1a5a57efe90

replace util.sort with sorted built-in This is marginally faster for small and moderately-sized lists
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Apr 2009 16:50:44 -0500
parents 35604226d712
children 227707c90548
comparison
equal deleted inserted replaced
8208:32a2a1e244f1 8209:a1a5a57efe90
36 self._baseurl = None 36 self._baseurl = None
37 if isinstance(conf, (list, tuple)): 37 if isinstance(conf, (list, tuple)):
38 self.repos = cleannames(conf) 38 self.repos = cleannames(conf)
39 self.repos_sorted = ('', False) 39 self.repos_sorted = ('', False)
40 elif isinstance(conf, dict): 40 elif isinstance(conf, dict):
41 self.repos = util.sort(cleannames(conf.items())) 41 self.repos = sorted(cleannames(conf.items()))
42 else: 42 else:
43 if isinstance(conf, config.config): 43 if isinstance(conf, config.config):
44 cp = conf 44 cp = conf
45 else: 45 else:
46 cp = config.config() 46 cp = config.config()