mercurial/phases.py
changeset 35442 56745e58df07
parent 35441 98cc121099fe
child 36452 ab81e5a8fba5
equal deleted inserted replaced
35441:98cc121099fe 35442:56745e58df07
   201 class phasecache(object):
   201 class phasecache(object):
   202     def __init__(self, repo, phasedefaults, _load=True):
   202     def __init__(self, repo, phasedefaults, _load=True):
   203         if _load:
   203         if _load:
   204             # Cheap trick to allow shallow-copy without copy module
   204             # Cheap trick to allow shallow-copy without copy module
   205             self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
   205             self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
   206             self._loadedrevslen = nullrev
   206             self._loadedrevslen = 0
   207             self._phasesets = None
   207             self._phasesets = None
   208             self.filterunknown(repo)
   208             self.filterunknown(repo)
   209             self.opener = repo.svfs
   209             self.opener = repo.svfs
   210 
   210 
   211     def getrevset(self, repo, phases, subset=None):
   211     def getrevset(self, repo, phases, subset=None):
   292                 self._loadedrevslen, self._phasesets = res
   292                 self._loadedrevslen, self._phasesets = res
   293             except AttributeError:
   293             except AttributeError:
   294                 self._computephaserevspure(repo)
   294                 self._computephaserevspure(repo)
   295 
   295 
   296     def invalidate(self):
   296     def invalidate(self):
   297         self._loadedrevslen = nullrev
   297         self._loadedrevslen = 0
   298         self._phasesets = None
   298         self._phasesets = None
   299 
   299 
   300     def phase(self, repo, rev):
   300     def phase(self, repo, rev):
   301         # We need a repo argument here to be able to build _phasesets
   301         # We need a repo argument here to be able to build _phasesets
   302         # if necessary. The repository instance is not stored in
   302         # if necessary. The repository instance is not stored in