Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 51401:04111ef08fb0
phases: always write with a repo
In the future change that move the internal representation of phase-roots from
node-id to rev-num, we will use a repository to translate revision numbers back
to node at write time.
Since that future change is quite complicated already, we do this small API
change beforehand.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 20 Feb 2024 21:38:01 +0100 |
parents | 8f2ea3fa50fd |
children | 7f7086a42b2b 9da3fcc5f70f |
comparison
equal
deleted
inserted
replaced
51400:68289ed170c7 | 51401:04111ef08fb0 |
---|---|
3361 """ | 3361 """ |
3362 # When using the same lock to commit and strip, the phasecache is left | 3362 # When using the same lock to commit and strip, the phasecache is left |
3363 # dirty after committing. Then when we strip, the repo is invalidated, | 3363 # dirty after committing. Then when we strip, the repo is invalidated, |
3364 # causing those changes to disappear. | 3364 # causing those changes to disappear. |
3365 if '_phasecache' in vars(self): | 3365 if '_phasecache' in vars(self): |
3366 self._phasecache.write() | 3366 self._phasecache.write(self) |
3367 | 3367 |
3368 @unfilteredmethod | 3368 @unfilteredmethod |
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 |