# HG changeset patch # User Shun-ichi GOTO # Date 1157427645 -32400 # Node ID 50e0392d51df7dbafe2b7572f0b25f3d70000935 # Parent 51083c31db047d95b888253fb64a0c65352e9641 Fix for Python 2.3 compatibility. Note: Name of comparing function of sort() is "cmpfunc" in Python 2.3 and "cmp" in Python 2.4. diff --git a/contrib/churn.py b/contrib/churn.py --- a/contrib/churn.py +++ b/contrib/churn.py @@ -156,7 +156,7 @@ def churn(ui, repo, **opts): # make a list of tuples (name, lines) and sort it in descending order ordered = stats.items() - ordered.sort(cmp=lambda x, y: cmp(y[1], x[1])) + ordered.sort(lambda x, y: cmp(y[1], x[1])) maximum = ordered[0][1]