mercurial/repoview.py
changeset 28265 332926212ef8
parent 27917 97e0dc6d248c
child 28780 faff8c2b5ee3
--- a/mercurial/repoview.py	Fri Feb 26 15:22:46 2016 +0000
+++ b/mercurial/repoview.py	Wed Feb 24 06:10:46 2016 +0900
@@ -315,7 +315,10 @@
         revs = filterrevs(unfi, self.filtername)
         cl = self._clcache
         newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed)
-        if cl is not None and newkey != self._clcachekey:
+        # if cl.index is not unfiindex, unfi.changelog would be
+        # recreated, and our clcache refers to garbage object
+        if (cl is not None and
+            (cl.index is not unfiindex or newkey != self._clcachekey)):
             cl = None
         # could have been made None by the previous if
         if cl is None: