Mercurial > hg
comparison mercurial/revset.py @ 20738:33943add5d65
revset: add some documentation for lazyset
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 14 Mar 2014 10:55:03 -0700 |
parents | b141080e70c5 |
children | 1b4f2399f3c4 |
comparison
equal
deleted
inserted
replaced
20737:b141080e70c5 | 20738:33943add5d65 |
---|---|
2252 """Duck type for baseset class which iterates lazily over the revisions in | 2252 """Duck type for baseset class which iterates lazily over the revisions in |
2253 the subset and contains a function which tests for membership in the | 2253 the subset and contains a function which tests for membership in the |
2254 revset | 2254 revset |
2255 """ | 2255 """ |
2256 def __init__(self, subset, condition=lambda x: True): | 2256 def __init__(self, subset, condition=lambda x: True): |
2257 """ | |
2258 condition: a function that decide whether a revision in the subset | |
2259 belongs to the revset or not. | |
2260 """ | |
2257 self._subset = subset | 2261 self._subset = subset |
2258 self._condition = condition | 2262 self._condition = condition |
2259 self._cache = {} | 2263 self._cache = {} |
2260 | 2264 |
2261 def ascending(self): | 2265 def ascending(self): |