##// END OF EJS Templates
transaction: pass the transaction to 'pending' callback...
Pierre-Yves David -
r23280:b01c491a default
parent child Browse files
Show More
@@ -270,7 +270,7 b' class changelog(revlog.revlog):'
270 270 self._nodecache = r._nodecache
271 271 self._chunkcache = r._chunkcache
272 272
273 def _writepending(self):
273 def _writepending(self, tr):
274 274 "create a file containing the unfinalized state for pretxnchangegroup"
275 275 if self._delaybuf:
276 276 # make a temporary copy of the index
@@ -281,6 +281,8 b' class transaction(object):'
281 281 def addpending(self, category, callback):
282 282 """add a callback to be called when the transaction is pending
283 283
284 The transaction will be given as callback's first argument.
285
284 286 Category is a unique identifier to allow overwriting an old callback
285 287 with a newer callback.
286 288 """
@@ -294,7 +296,7 b' class transaction(object):'
294 296 categories = sorted(self._pendingcallback)
295 297 for cat in categories:
296 298 # remove callback since the data will have been flushed
297 any = self._pendingcallback.pop(cat)()
299 any = self._pendingcallback.pop(cat)(self)
298 300 self._anypending = self._anypending or any
299 301 return self._anypending
300 302
General Comments 0
You need to be logged in to leave comments. Login now