3310 return None |
3308 return None |
3311 |
3309 |
3312 class fullreposet(spanset): |
3310 class fullreposet(spanset): |
3313 """a set containing all revisions in the repo |
3311 """a set containing all revisions in the repo |
3314 |
3312 |
3315 This class exists to host special optimization. |
3313 This class exists to host special optimization and magic to handle virtual |
|
3314 revisions such as "null". |
3316 """ |
3315 """ |
3317 |
3316 |
3318 def __init__(self, repo): |
3317 def __init__(self, repo): |
3319 super(fullreposet, self).__init__(repo) |
3318 super(fullreposet, self).__init__(repo) |
3320 |
3319 |
3321 def __contains__(self, rev): |
3320 def __contains__(self, rev): |
|
3321 # assumes the given rev is valid |
3322 hidden = self._hiddenrevs |
3322 hidden = self._hiddenrevs |
3323 return ((self._start <= rev < self._end) |
3323 return not (hidden and rev in hidden) |
3324 and not (hidden and rev in hidden)) |
|
3325 |
3324 |
3326 def __and__(self, other): |
3325 def __and__(self, other): |
3327 """As self contains the whole repo, all of the other set should also be |
3326 """As self contains the whole repo, all of the other set should also be |
3328 in self. Therefore `self & other = other`. |
3327 in self. Therefore `self & other = other`. |
3329 |
3328 |