# HG changeset patch # User Pierre-Yves David # Date 1412133994 18000 # Node ID 6877ba8d85ff3ff2f075f4353f21af91f7a64014 # Parent 557749fea14ab37dbf9fcec089cf1895e8e0d1e5 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). diff -r 557749fea14a -r 6877ba8d85ff mercurial/revset.py --- a/mercurial/revset.py Thu Oct 02 18:35:56 2014 -0500 +++ b/mercurial/revset.py Tue Sep 30 22:26:34 2014 -0500 @@ -2218,6 +2218,14 @@ """iterate the set in the order it is supposed to be iterated""" raise NotImplementedError() + # Attributes containing a function to perform a fast iteration in a given + # direction. A smartset can have none, one, or both defined. + # + # Default value is None instead of a function returning None to avoid + # initializing an iterator just for testing if a fast method exists. + fastasc = None + fastdesc = None + def isascending(self): """True if the set will iterate in ascending order""" raise NotImplementedError()