Mercurial > hg-stable
changeset 22508:2434c68d82a8
revert: add a fullreposet class
Every revset evaluation starts from `subset = spanset(repo)` and a lot of
revset predicates build a `spansetrepo` for their internal needs.
`spanset` is a generic class that can handle any situation. As a result a lot
of operation between spanset result in an `orderedlazyset`, a safe object but
suboptimal in may situation.
So we introduce a `fullreposet` class where some of the operation will be
overwritten to produce more interesting results.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 29 Apr 2014 19:06:15 -0700 |
parents | 5c00c5298f98 |
children | fbae659543cf |
files | mercurial/revset.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Tue Sep 23 12:21:38 2014 -0700 +++ b/mercurial/revset.py Tue Apr 29 19:06:15 2014 -0700 @@ -2851,5 +2851,14 @@ def filter(self, l): return orderedlazyset(self, l, ascending=self.isascending()) +class fullreposet(spanset): + """a set containing all revisions in the repo + + This class exists to host special optimisation. + """ + + def __init__(self, repo): + super(fullreposet, self).__init__(repo) + # tell hggettext to extract docstrings from these functions: i18nfunctions = symbols.values()