Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 51399:8f2ea3fa50fd
phases: explicitly filter stripped revision at strip time
Explicit is better than implicit. The current logic is bit subtle and fragile.
It also get in the way of using something else than node-id as internal storage.
We replace it with a more explicit filtering while striping.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 20 Feb 2024 14:21:18 +0100 |
parents | 58d39c7865e5 |
children | 04111ef08fb0 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Feb 23 04:26:03 2024 +0100 +++ b/mercurial/localrepo.py Tue Feb 20 14:21:18 2024 +0100 @@ -3371,17 +3371,6 @@ Intended for use by strip and rollback, so there's a common place for anything that has to be done after destroying history. """ - # When one tries to: - # 1) destroy nodes thus calling this method (e.g. strip) - # 2) use phasecache somewhere (e.g. commit) - # - # then 2) will fail because the phasecache contains nodes that were - # removed. We can either remove phasecache from the filecache, - # causing it to reload next time it is accessed, or simply filter - # the removed nodes now and write the updated cache. - self._phasecache.filterunknown(self) - self._phasecache.write() - # refresh all repository caches self.updatecaches()