mercurial/localrepo.py
changeset 51398 8f2ea3fa50fd
parent 51281 58d39c7865e5
child 51401 04111ef08fb0
equal deleted inserted replaced
51397:e2dfa403452d 51398:8f2ea3fa50fd
  3369     def destroyed(self):
  3369     def destroyed(self):
  3370         """Inform the repository that nodes have been destroyed.
  3370         """Inform the repository that nodes have been destroyed.
  3371         Intended for use by strip and rollback, so there's a common
  3371         Intended for use by strip and rollback, so there's a common
  3372         place for anything that has to be done after destroying history.
  3372         place for anything that has to be done after destroying history.
  3373         """
  3373         """
  3374         # When one tries to:
       
  3375         # 1) destroy nodes thus calling this method (e.g. strip)
       
  3376         # 2) use phasecache somewhere (e.g. commit)
       
  3377         #
       
  3378         # then 2) will fail because the phasecache contains nodes that were
       
  3379         # removed. We can either remove phasecache from the filecache,
       
  3380         # causing it to reload next time it is accessed, or simply filter
       
  3381         # the removed nodes now and write the updated cache.
       
  3382         self._phasecache.filterunknown(self)
       
  3383         self._phasecache.write()
       
  3384 
       
  3385         # refresh all repository caches
  3374         # refresh all repository caches
  3386         self.updatecaches()
  3375         self.updatecaches()
  3387 
  3376 
  3388         # Ensure the persistent tag cache is updated.  Doing it now
  3377         # Ensure the persistent tag cache is updated.  Doing it now
  3389         # means that the tag cache only has to worry about destroyed
  3378         # means that the tag cache only has to worry about destroyed