comparison mercurial/localrepo.py @ 23205:2d54aa5397cd

changelog: rely on transaction for finalization Instead of calling 'cl.finalize()' by hand (possibly at a bogus time) we register it in the transaction during 'delayupdate' and rely on 'tr.close()' to call it at the right time.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 18 Oct 2014 01:09:41 -0700
parents 3872d563e01a
children 76effa770ff9
comparison
equal deleted inserted replaced
23204:10beda5bd2b7 23205:2d54aa5397cd
1443 user, ctx.date(), ctx.extra().copy()) 1443 user, ctx.date(), ctx.extra().copy())
1444 p = lambda: tr.writepending() and self.root or "" 1444 p = lambda: tr.writepending() and self.root or ""
1445 xp1, xp2 = p1.hex(), p2 and p2.hex() or '' 1445 xp1, xp2 = p1.hex(), p2 and p2.hex() or ''
1446 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, 1446 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1,
1447 parent2=xp2, pending=p) 1447 parent2=xp2, pending=p)
1448 self.changelog.finalize(trp)
1449 # set the new commit is proper phase 1448 # set the new commit is proper phase
1450 targetphase = subrepo.newcommitphase(self.ui, ctx) 1449 targetphase = subrepo.newcommitphase(self.ui, ctx)
1451 if targetphase: 1450 if targetphase:
1452 # retract boundary do not alter parent changeset. 1451 # retract boundary do not alter parent changeset.
1453 # if a parent have higher the resulting phase will 1452 # if a parent have higher the resulting phase will