comparison mercurial/revset.py @ 22716:6877ba8d85ff

abstractsmartset: document the `fastasc` and `fastdesc` attributes/methods See the in-line documentation for details. (This is the beginning of a massive overhaul of revset).
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 30 Sep 2014 22:26:34 -0500
parents 557749fea14a
children b89f7e3a414d
comparison
equal deleted inserted replaced
22715:557749fea14a 22716:6877ba8d85ff
2216 2216
2217 def __iter__(self): 2217 def __iter__(self):
2218 """iterate the set in the order it is supposed to be iterated""" 2218 """iterate the set in the order it is supposed to be iterated"""
2219 raise NotImplementedError() 2219 raise NotImplementedError()
2220 2220
2221 # Attributes containing a function to perform a fast iteration in a given
2222 # direction. A smartset can have none, one, or both defined.
2223 #
2224 # Default value is None instead of a function returning None to avoid
2225 # initializing an iterator just for testing if a fast method exists.
2226 fastasc = None
2227 fastdesc = None
2228
2221 def isascending(self): 2229 def isascending(self):
2222 """True if the set will iterate in ascending order""" 2230 """True if the set will iterate in ascending order"""
2223 raise NotImplementedError() 2231 raise NotImplementedError()
2224 2232
2225 def ascending(self): 2233 def ascending(self):