diff -r ea5af863fbff -r 3872d563e01a mercurial/exchange.py --- a/mercurial/exchange.py Fri Oct 17 21:19:54 2014 -0700 +++ b/mercurial/exchange.py Fri Oct 17 21:55:31 2014 -0700 @@ -854,9 +854,7 @@ """close transaction if created""" if self._tr is not None: repo = self.repo - cl = repo.unfiltered().changelog - p = cl.writepending() and repo.root or "" - p = cl.writepending() and repo.root or "" + p = lambda: self._tr.writepending() and repo.root or "" repo.hook('b2x-pretransactionclose', throw=True, pending=p, **self._tr.hookargs) self._tr.close() @@ -1279,8 +1277,7 @@ tr.hookargs['url'] = url tr.hookargs['bundle2-exp'] = '1' r = bundle2.processbundle(repo, cg, lambda: tr).reply - cl = repo.unfiltered().changelog - p = cl.writepending() and repo.root or "" + p = lambda: tr.writepending() and repo.root or "" repo.hook('b2x-pretransactionclose', throw=True, pending=p, **tr.hookargs) tr.close()