##// 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 def matching(repo, subset, x):
996 996 # is only one field to match)
997 997 getinfo = lambda r: [f(r) for f in getfieldfuncs]
998 998
999 matches = []
999 matches = set()
1000 1000 for rev in revs:
1001 1001 target = getinfo(rev)
1002 1002 for r in subset:
@@ -1006,10 +1006,8 def matching(repo, subset, x):
1006 1006 match = False
1007 1007 break
1008 1008 if match:
1009 matches.append(r)
1010 if len(revs) > 1:
1011 matches = sorted(set(matches))
1012 return matches
1009 matches.add(r)
1010 return [r for r in subset if r in matches]
1013 1011
1014 1012 def reverse(repo, subset, x):
1015 1013 """``reverse(set)``
@@ -410,6 +410,10 quoting needed
410 410 0
411 411 $ log '4::8 - 8'
412 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 418 issue2437
415 419
General Comments 0
You need to be logged in to leave comments. Login now