# HG changeset patch # User Idan Kamara # Date 1357855552 -7200 # Node ID 7331ee72f99cbdc608836dcff0129ce0f01048c5 # Parent 08407464875512da82d314e8acc2357e58fa1b37 localrepo: write the phasecache when destroying nodes diff -r 084074648755 -r 7331ee72f99c mercurial/localrepo.py --- a/mercurial/localrepo.py Sat Jan 05 16:50:12 2013 +0200 +++ b/mercurial/localrepo.py Fri Jan 11 00:05:52 2013 +0200 @@ -1396,6 +1396,12 @@ # revisions missing because the cache is out-of-date. branchmap.updatecache(self) + # When using the same lock to commit and strip, the phasecache is left + # dirty after committing. Then when we strip, the repo is invalidated, + # causing those changes to disappear. + if '_phasecache' in vars(self): + self._phasecache.write() + @unfilteredmethod def destroyed(self, newheadnodes=None): '''Inform the repository that nodes have been destroyed.