# HG changeset patch # User Pierre-Yves David # Date 2014-10-01 03:26:34 # 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 --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2218,6 +2218,14 @@ class abstractsmartset(object): """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()