Mercurial > hg
changeset 18223:6d6d0248530b
destroyed: filter unknown before computing branchcache
Branchcache of filtered version need up to date phase data.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 04 Jan 2013 19:05:20 +0100 |
parents | 47f00b0de337 |
children | 6a082e72df4e |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Jan 02 01:36:57 2013 +0100 +++ b/mercurial/localrepo.py Fri Jan 04 19:05:20 2013 +0100 @@ -1413,16 +1413,6 @@ code to update the branchheads cache, rather than having future code decide it's invalid and regenerating it from scratch. ''' - # If we have info, newheadnodes, on how to update the branch cache, do - # it, Otherwise, since nodes were destroyed, the cache is stale and this - # will be caught the next time it is read. - if newheadnodes: - ctxgen = (self[node] for node in newheadnodes - if self.changelog.hasnode(node)) - cache = self._branchcaches[None] - cache.update(self, ctxgen) - cache.write(self) - # When one tries to: # 1) destroy nodes thus calling this method (e.g. strip) # 2) use phasecache somewhere (e.g. commit) @@ -1435,6 +1425,16 @@ self._phasecache.filterunknown(self) self._phasecache.write() + # If we have info, newheadnodes, on how to update the branch cache, do + # it, Otherwise, since nodes were destroyed, the cache is stale and this + # will be caught the next time it is read. + if newheadnodes: + ctxgen = (self[node] for node in newheadnodes + if self.changelog.hasnode(node)) + cache = self._branchcaches[None] + cache.update(self, ctxgen) + cache.write(self) + # Ensure the persistent tag cache is updated. Doing it now # means that the tag cache only has to worry about destroyed # heads immediately after a strip/rollback. That in turn