Submitter | Pierre-Yves David |
---|---|
Date | Oct. 15, 2014, 7:57 p.m. |
Message ID | <e642e0ab2f8f535f7afc.1413403078@marginatus.alto.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/6283/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2253,10 +2253,16 @@ class abstractsmartset(object): """return the last element in the set (user iteration perspective) Return None if the set is empty""" raise NotImplementedError() + def __len__(self): + """return the length of the smartsets + + This can be expensive on smartset that could be lazy otherwise.""" + raise NotImplementedError() + def reverse(self): """reverse the expected iteration order""" raise NotImplementedError() def sort(self, reverse=True):