##// END OF EJS Templates
revset: make matching() preserve input revision order
Patrick Mezard -
r16640:592e0bee stable
parent child Browse files
Show More
@@ -996,7 +996,7 b' def matching(repo, subset, x):'
996 # is only one field to match)
996 # is only one field to match)
997 getinfo = lambda r: [f(r) for f in getfieldfuncs]
997 getinfo = lambda r: [f(r) for f in getfieldfuncs]
998
998
999 matches = []
999 matches = set()
1000 for rev in revs:
1000 for rev in revs:
1001 target = getinfo(rev)
1001 target = getinfo(rev)
1002 for r in subset:
1002 for r in subset:
@@ -1006,10 +1006,8 b' def matching(repo, subset, x):'
1006 match = False
1006 match = False
1007 break
1007 break
1008 if match:
1008 if match:
1009 matches.append(r)
1009 matches.add(r)
1010 if len(revs) > 1:
1010 return [r for r in subset if r in matches]
1011 matches = sorted(set(matches))
1012 return matches
1013
1011
1014 def reverse(repo, subset, x):
1012 def reverse(repo, subset, x):
1015 """``reverse(set)``
1013 """``reverse(set)``
@@ -410,6 +410,10 b' quoting needed'
410 0
410 0
411 $ log '4::8 - 8'
411 $ log '4::8 - 8'
412 4
412 4
413 $ log 'matching(1 or 2 or 3) and (2 or 3 or 1)'
414 2
415 3
416 1
413
417
414 issue2437
418 issue2437
415
419
General Comments 0
You need to be logged in to leave comments. Login now