revset: make matching() work on python 2.4
authorPatrick Mezard <patrick@mezard.eu>
Tue, 17 Apr 2012 10:33:47 +0200
changeset 16453 d2a865d4b963
parent 16452 8a72805034d5
child 16454 92c7e917b647
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.
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)