##// END OF EJS Templates
repoview: cache hidden changesets...
David Soria Parra -
r22151:c0c369ae default
parent child Browse files
Show More
@@ -95,9 +95,9 b' def trywritehiddencache(repo, hideable, '
95 95 fh.write(newhash)
96 96 fh.write(data)
97 97 except (IOError, OSError):
98 ui.debug('error writing hidden changesets cache')
98 repo.ui.debug('error writing hidden changesets cache')
99 99 except error.LockHeld:
100 ui.debug('cannot obtain lock to write hidden changesets cache')
100 repo.ui.debug('cannot obtain lock to write hidden changesets cache')
101 101 finally:
102 102 if fh:
103 103 fh.close()
@@ -128,12 +128,24 b' def computehidden(repo):'
128 128
129 129 During most operation hidden should be filtered."""
130 130 assert not repo.changelog.filteredrevs
131
131 132 hidden = frozenset()
132 133 hideable = hideablerevs(repo)
133 134 if hideable:
134 135 cl = repo.changelog
136 hidden = tryreadcache(repo, hideable)
137 if hidden is None:
135 138 blocked = cl.ancestors(_getstaticblockers(repo), inclusive=True)
136 139 hidden = frozenset(r for r in hideable if r not in blocked)
140 trywritehiddencache(repo, hideable, hidden)
141 elif repo.ui.configbool('experimental', 'verifyhiddencache', True):
142 blocked = cl.ancestors(_getstaticblockers(repo), inclusive=True)
143 computed = frozenset(r for r in hideable if r not in blocked)
144 if computed != hidden:
145 trywritehiddencache(repo, hideable, computed)
146 repo.ui.warn(_('Cache inconsistency detected. Please ' +
147 'open an issue on http://bz.selenic.com.\n'))
148 hidden = computed
137 149
138 150 # check if we have wd parents, bookmarks or tags pointing to hidden
139 151 # changesets and remove those.
General Comments 0
You need to be logged in to leave comments. Login now