Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 26405:c15d8f84343e stable
localrepo: recreate phasecache if changelog was modified (issue4855)
Because _phaserevs and _phasesets cache revision numbers, they must be
invalidated if there are new commits or stripped revisions. We could do
that by calling _phasecache.invalidate(), but it wasn't simple to be
integrated with the filecache mechanism.
So for now, phasecache will be recreated after repo.invalidate() if
00changelog.i was modified before.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 29 Sep 2015 21:57:08 +0900 |
parents | 800e090e9c64 |
children | 19d946cf2a1b |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Sep 25 13:30:49 2015 -0700 +++ b/mercurial/localrepo.py Tue Sep 29 21:57:08 2015 +0900 @@ -429,7 +429,10 @@ heads.append(n) return heads - @storecache('phaseroots') + # _phaserevs and _phasesets depend on changelog. what we need is to + # call _phasecache.invalidate() if '00changelog.i' was changed, but it + # can't be easily expressed in filecache mechanism. + @storecache('phaseroots', '00changelog.i') def _phasecache(self): return phases.phasecache(self, self._phasedefaults)