comparison mercurial/revset.py @ 22754:1119e544cd2d

baseset: rely on the abstractsmartset implementation for filter
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 03 Oct 2014 03:19:00 -0500
parents 16c20403de80
children f9a825b593be
comparison
equal deleted inserted replaced
22753:16c20403de80 22754:1119e544cd2d
2373 """Returns True if the collection is descending order, False if not. 2373 """Returns True if the collection is descending order, False if not.
2374 2374
2375 This is part of the mandatory API for smartset.""" 2375 This is part of the mandatory API for smartset."""
2376 return False 2376 return False
2377 2377
2378 def filter(self, condition):
2379 """Returns this smartset filtered by condition as a new smartset.
2380
2381 `condition` is a callable which takes a revision number and returns a
2382 boolean.
2383
2384 This is part of the mandatory API for smartset."""
2385 return filteredset(self, condition)
2386
2387 class filteredset(abstractsmartset): 2378 class filteredset(abstractsmartset):
2388 """Duck type for baseset class which iterates lazily over the revisions in 2379 """Duck type for baseset class which iterates lazily over the revisions in
2389 the subset and contains a function which tests for membership in the 2380 the subset and contains a function which tests for membership in the
2390 revset 2381 revset
2391 """ 2382 """