hgext/churn.py
changeset 9032 1fa80c5428b8
parent 8934 9dda4c73fc3b
child 9056 feb3445e8b84
--- a/hgext/churn.py	Sun Jul 05 11:01:30 2009 +0200
+++ b/hgext/churn.py	Sun Jul 05 11:02:00 2009 +0200
@@ -143,8 +143,8 @@
     if not rate:
         return
 
-    sortfn = ((not opts.get('sort')) and (lambda a, b: cmp(b[1], a[1])) or None)
-    rate.sort(sortfn)
+    sortkey = ((not opts.get('sort')) and (lambda x: -x[1]) or None)
+    rate.sort(key=sortkey)
 
     maxcount = float(max([v for k, v in rate]))
     maxname = max([len(k) for k, v in rate])