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.
--- 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)