diff -r f60ed8cf4afc -r 6c1351352b6c mercurial/exchange.py --- a/mercurial/exchange.py Sat Nov 08 16:31:38 2014 +0000 +++ b/mercurial/exchange.py Sat Nov 08 16:35:15 2014 +0000 @@ -861,7 +861,7 @@ def runhooks(): repo.hook('b2x-transactionclose', **hookargs) self._tr.addpostclose('b2x-hook-transactionclose', - lambda: repo._afterlock(runhooks)) + lambda tr: repo._afterlock(runhooks)) self._tr.close() def releasetransaction(self): @@ -1286,7 +1286,7 @@ def runhooks(): repo.hook('b2x-transactionclose', **hookargs) tr.addpostclose('b2x-hook-transactionclose', - lambda: repo._afterlock(runhooks)) + lambda tr: repo._afterlock(runhooks)) tr.close() except Exception, exc: exc.duringunbundle2 = True