diff -r e245775f8fd3 -r b01c491af0cf mercurial/transaction.py --- a/mercurial/transaction.py Wed Nov 05 10:22:17 2014 +0000 +++ b/mercurial/transaction.py Sat Nov 08 16:27:50 2014 +0000 @@ -281,6 +281,8 @@ def addpending(self, category, callback): """add a callback to be called when the transaction is pending + The transaction will be given as callback's first argument. + Category is a unique identifier to allow overwriting an old callback with a newer callback. """ @@ -294,7 +296,7 @@ categories = sorted(self._pendingcallback) for cat in categories: # remove callback since the data will have been flushed - any = self._pendingcallback.pop(cat)() + any = self._pendingcallback.pop(cat)(self) self._anypending = self._anypending or any return self._anypending