Mercurial > hg
comparison mercurial/statichttprepo.py @ 24377:656f93ce66d5
revbranchcache: move cache writing to the transaction finalizer
Instead of writing the revbranchcache during updatecache (which often happens
too early, before the cache is even populated), let's run it as part of the
transaction finalizer. It still won't be written for read-only operations, but
that's no worse than it is today.
A future commit will remove the actual write that happens in updatecache().
This is also good prep for when all caches get moved into the transaction.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 10 Feb 2015 20:06:12 -0800 |
parents | 59cc09240afb |
children | 7a1af58ab242 |
comparison
equal
deleted
inserted
replaced
24376:203a078da052 | 24377:656f93ce66d5 |
---|---|
142 self.nodetagscache = None | 142 self.nodetagscache = None |
143 self._branchcaches = {} | 143 self._branchcaches = {} |
144 self._revbranchcache = None | 144 self._revbranchcache = None |
145 self.encodepats = None | 145 self.encodepats = None |
146 self.decodepats = None | 146 self.decodepats = None |
147 self._transref = None | |
147 | 148 |
148 def _restrictcapabilities(self, caps): | 149 def _restrictcapabilities(self, caps): |
149 caps = super(statichttprepository, self)._restrictcapabilities(caps) | 150 caps = super(statichttprepository, self)._restrictcapabilities(caps) |
150 return caps.difference(["pushkey"]) | 151 return caps.difference(["pushkey"]) |
151 | 152 |