repoview: invalidate cached changelog if _delayed changes (issue4549) stable
authorMatt Mackall <mpm@selenic.com>
Sun, 01 Mar 2015 23:20:02 -0600
branchstable
changeset 24154 a41902aac76d
parent 24153 f7401f816cc9
child 24155 e5ce49a30146
repoview: invalidate cached changelog if _delayed changes (issue4549) Starting with 2d54aa5397cd, when a clone reached the checkout stage, the cached changelog in the filtered view was still seeing the _delayed flag, even though the changelog had already been finalized.
mercurial/repoview.py
--- a/mercurial/repoview.py	Thu Feb 26 10:23:04 2015 -0800
+++ b/mercurial/repoview.py	Sun Mar 01 23:20:02 2015 -0600
@@ -274,7 +274,8 @@
         unfichangelog = unfi.changelog
         revs = filterrevs(unfi, self.filtername)
         cl = self._clcache
-        newkey = (len(unfichangelog), unfichangelog.tip(), hash(revs))
+        newkey = (len(unfichangelog), unfichangelog.tip(), hash(revs),
+                  unfichangelog._delayed)
         if cl is not None:
             # we need to check curkey too for some obscure reason.
             # MQ test show a corruption of the underlying repo (in _clcache)
@@ -282,7 +283,7 @@
             oldfilter = cl.filteredrevs
             try:
                 cl.filteredrevs = ()  # disable filtering for tip
-                curkey = (len(cl), cl.tip(), hash(oldfilter))
+                curkey = (len(cl), cl.tip(), hash(oldfilter), cl._delayed)
             finally:
                 cl.filteredrevs = oldfilter
             if newkey != self._clcachekey or newkey != curkey: