comparison mercurial/repoview.py @ 22317:e1d5fcab58b6 stable

repoview: fix typo in repoview.changelog Incidentally, this avoids the changelog cache being invalidated each time it's accessed on a repoview. On a filtering experiment on a repository the size of mozilla-central, this makes a significant difference: Before, running hg log -l 10 --time with about 8k changesets filtered out: time: real 1.490 secs (user 1.450+0.000 sys 0.040+0.000) After: time: real 0.540 secs (user 0.530+0.000 sys 0.010+0.000)
author Mike Hommey <mh@glandium.org>
date Sun, 31 Aug 2014 19:43:03 +0900
parents e5dfa8689cf0
children c5df4af17110
comparison
equal deleted inserted replaced
22316:816be4ca4ae2 22317:e1d5fcab58b6
187 # we need to check curkey too for some obscure reason. 187 # we need to check curkey too for some obscure reason.
188 # MQ test show a corruption of the underlying repo (in _clcache) 188 # MQ test show a corruption of the underlying repo (in _clcache)
189 # without change in the cachekey. 189 # without change in the cachekey.
190 oldfilter = cl.filteredrevs 190 oldfilter = cl.filteredrevs
191 try: 191 try:
192 cl.filterrevs = () # disable filtering for tip 192 cl.filteredrevs = () # disable filtering for tip
193 curkey = (len(cl), cl.tip(), hash(oldfilter)) 193 curkey = (len(cl), cl.tip(), hash(oldfilter))
194 finally: 194 finally:
195 cl.filteredrevs = oldfilter 195 cl.filteredrevs = oldfilter
196 if newkey != self._clcachekey or newkey != curkey: 196 if newkey != self._clcachekey or newkey != curkey:
197 cl = None 197 cl = None