##// END OF EJS Templates
revset: turn spanset into a factory function...
Pierre-Yves David -
r22509:fbae6595 default
parent child Browse files
Show More
@@ -2732,7 +2732,18 b' class _descgeneratorset(_generatorset):'
2732 2732 self._cache[x] = False
2733 2733 return False
2734 2734
2735 class spanset(_orderedsetmixin):
2735 def spanset(repo, start=None, end=None):
2736 """factory function to dispatch between fullreposet and actual spanset
2737
2738 Feel free to update all spanset call sites and kill this function at some
2739 point.
2740 """
2741 if start is None and end is None:
2742 return fullreposet(repo)
2743 return _spanset(repo, start, end)
2744
2745
2746 class _spanset(_orderedsetmixin):
2736 2747 """Duck type for baseset class which represents a range of revisions and
2737 2748 can work lazily and without having all the range in memory
2738 2749
@@ -2851,7 +2862,7 b' class spanset(_orderedsetmixin):'
2851 2862 def filter(self, l):
2852 2863 return orderedlazyset(self, l, ascending=self.isascending())
2853 2864
2854 class fullreposet(spanset):
2865 class fullreposet(_spanset):
2855 2866 """a set containing all revisions in the repo
2856 2867
2857 2868 This class exists to host special optimisation.
General Comments 0
You need to be logged in to leave comments. Login now