##// END OF EJS Templates
changelog: rely on transaction for finalization...
Pierre-Yves David -
r23205:2d54aa53 default
parent child Browse files
Show More
@@ -788,8 +788,6 def addchangegroup(repo, source, srctype
788 788 # strip should not touch boundary at all
789 789 phases.retractboundary(repo, tr, targetphase, added)
790 790
791 # make changelog see real files again
792 cl.finalize(trp)
793 791
794 792 tr.close()
795 793
@@ -5,6 +5,7
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 import weakref
8 9 from node import bin, hex, nullid
9 10 from i18n import _
10 11 import util, error, revlog, encoding
@@ -239,8 +240,10 class changelog(revlog.revlog):
239 240 self._delaybuf)
240 241 self._delayed = True
241 242 tr.addpending('cl-%i' % id(self), self._writepending)
243 trp = weakref.proxy(tr)
244 tr.addfinalize('cl-%i' % id(self), lambda: self._finalize(trp))
242 245
243 def finalize(self, tr):
246 def _finalize(self, tr):
244 247 "finalize index updates"
245 248 self._delayed = False
246 249 self.opener = self._realopener
@@ -1445,7 +1445,6 class localrepository(object):
1445 1445 xp1, xp2 = p1.hex(), p2 and p2.hex() or ''
1446 1446 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1,
1447 1447 parent2=xp2, pending=p)
1448 self.changelog.finalize(trp)
1449 1448 # set the new commit is proper phase
1450 1449 targetphase = subrepo.newcommitphase(self.ui, ctx)
1451 1450 if targetphase:
General Comments 0
You need to be logged in to leave comments. Login now