# HG changeset patch # User Patrick Mezard # Date 1334651627 -7200 # Node ID d2a865d4b963cd3996575ca5b1a0ea4f6fcc8c98 # Parent 8a72805034d5b5e251d0e161b4094bba4687c29b revset: make matching() work on python 2.4 tuple.index() was apparently added to python 2.6: http://bugs.python.org/issue1696444 Also remove a trailing comma to make check-code.py happy. diff -r 8a72805034d5 -r d2a865d4b963 mercurial/revset.py --- a/mercurial/revset.py Tue Apr 17 15:10:33 2012 +0200 +++ b/mercurial/revset.py Tue Apr 17 10:33:47 2012 +0200 @@ -952,8 +952,8 @@ # We may want to match more than one field # Not all fields take the same amount of time to be matched # Sort the selected fields in order of increasing matching cost - fieldorder = ('phase parents user date branch summary files description' - ' substate').split() + fieldorder = ['phase', 'parents', 'user', 'date', 'branch', 'summary', + 'files', 'description', 'substate'] def fieldkeyfunc(f): try: return fieldorder.index(f)