2742 if self._finished: |
2742 if self._finished: |
2743 return iter(self._genlist) |
2743 return iter(self._genlist) |
2744 |
2744 |
2745 # We have to use this complex iteration strategy to allow multiple |
2745 # We have to use this complex iteration strategy to allow multiple |
2746 # iterations at the same time. We need to be able to catch revision |
2746 # iterations at the same time. We need to be able to catch revision |
2747 # removed from `consumegen` and added to genlist in another instance. |
2747 # removed from _consumegen and added to genlist in another instance. |
2748 # |
2748 # |
2749 # Getting rid of it would provide an about 15% speed up on this |
2749 # Getting rid of it would provide an about 15% speed up on this |
2750 # iteration. |
2750 # iteration. |
2751 genlist = self._genlist |
2751 genlist = self._genlist |
2752 nextrev = self._consumegen().next |
2752 nextrev = self._consumegen().next |
2937 return None |
2937 return None |
2938 |
2938 |
2939 class fullreposet(_spanset): |
2939 class fullreposet(_spanset): |
2940 """a set containing all revisions in the repo |
2940 """a set containing all revisions in the repo |
2941 |
2941 |
2942 This class exists to host special optimisation. |
2942 This class exists to host special optimization. |
2943 """ |
2943 """ |
2944 |
2944 |
2945 def __init__(self, repo): |
2945 def __init__(self, repo): |
2946 super(fullreposet, self).__init__(repo) |
2946 super(fullreposet, self).__init__(repo) |
2947 |
2947 |
2948 def __and__(self, other): |
2948 def __and__(self, other): |
2949 """fullrepo & other -> other |
2949 """As self contains the whole repo, all of the other set should also be |
2950 |
2950 in self. Therefore `self & other = other`. |
2951 As self contains the whole repo, all of the other set should also be in |
|
2952 self. Therefor `self & other = other`. |
|
2953 |
2951 |
2954 This boldly assumes the other contains valid revs only. |
2952 This boldly assumes the other contains valid revs only. |
2955 """ |
2953 """ |
2956 # other not a smartset, make is so |
2954 # other not a smartset, make is so |
2957 if not util.safehasattr(other, 'isascending'): |
2955 if not util.safehasattr(other, 'isascending'): |