diff mercurial/ui.py @ 6762:f67d1468ac50

util: add sort helper
author Matt Mackall <mpm@selenic.com>
date Fri, 27 Jun 2008 18:28:45 -0500
parents eed0a6a05096
children 7192876ac329
line wrap: on
line diff
--- a/mercurial/ui.py	Fri Jun 27 14:53:30 2008 -0500
+++ b/mercurial/ui.py	Fri Jun 27 18:28:45 2008 -0500
@@ -312,15 +312,11 @@
         items = self._configitems(section, untrusted=untrusted, abort=True)
         if self.debugflag and not untrusted and self.ucdata:
             uitems = self._configitems(section, untrusted=True, abort=False)
-            keys = uitems.keys()
-            keys.sort()
-            for k in keys:
+            for k in util.sort(uitems):
                 if uitems[k] != items.get(k):
                     self.warn(_("Ignoring untrusted configuration option "
                                 "%s.%s = %s\n") % (section, k, uitems[k]))
-        x = items.items()
-        x.sort()
-        return x
+        return util.sort(items.items())
 
     def walkconfig(self, untrusted=False):
         cdata = self._get_cdata(untrusted)