##// END OF EJS Templates
revbranchcache: move cache writing to the transaction finalizer...
Durham Goode -
r24377:656f93ce default
parent child Browse files
Show More
@@ -414,7 +414,11 b' class revbranchcache(object):'
414 self._rbcrevs[rbcrevidx:rbcrevidx + _rbcrecsize] = rec
414 self._rbcrevs[rbcrevidx:rbcrevidx + _rbcrecsize] = rec
415 self._rbcrevslen = min(self._rbcrevslen, rev)
415 self._rbcrevslen = min(self._rbcrevslen, rev)
416
416
417 def write(self):
417 tr = self._repo.currenttransaction()
418 if tr:
419 tr.addfinalize('write-revbranchcache', self.write)
420
421 def write(self, tr=None):
418 """Save branch cache if it is dirty."""
422 """Save branch cache if it is dirty."""
419 repo = self._repo
423 repo = self._repo
420 if self._rbcnamescount < len(self._names):
424 if self._rbcnamescount < len(self._names):
@@ -144,6 +144,7 b' class statichttprepository(localrepo.loc'
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)
General Comments 0
You need to be logged in to leave comments. Login now