comparison mercurial/revset.py @ 16452:8a72805034d5

revset: use list instead of tuple for compatibility with python before 2.6 'string elements'.split() instead of explicitly typing a list of strings is used. This is done in other parts of Mercurial code, too.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 17 Apr 2012 15:10:33 +0200
parents 984e0412e82b
children d2a865d4b963
comparison
equal deleted inserted replaced
16451:9c431cfdca12 16452:8a72805034d5
950 fields.discard('summary') 950 fields.discard('summary')
951 951
952 # We may want to match more than one field 952 # We may want to match more than one field
953 # Not all fields take the same amount of time to be matched 953 # Not all fields take the same amount of time to be matched
954 # Sort the selected fields in order of increasing matching cost 954 # Sort the selected fields in order of increasing matching cost
955 fieldorder = ('phase', 'parents', 'user', 'date', 'branch', 'summary', 955 fieldorder = ('phase parents user date branch summary files description'
956 'files', 'description', 'substate',) 956 ' substate').split()
957 def fieldkeyfunc(f): 957 def fieldkeyfunc(f):
958 try: 958 try:
959 return fieldorder.index(f) 959 return fieldorder.index(f)
960 except ValueError: 960 except ValueError:
961 # assume an unknown field is very costly 961 # assume an unknown field is very costly