comparison mercurial/localrepo.py @ 24739:ea0d5c8e047f

transaction: actually use tr.hookargs in pretxnclose The 'tr.hookargs' is a dictionary containing all the arguments to be passed to hooks. It is actually used for hooks now...
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 14 Apr 2015 13:07:41 -0400
parents 553dc2b094d9
children d283517b260b
comparison
equal deleted inserted replaced
24738:457e26da029b 24739:ea0d5c8e047f
954 reporef = weakref.ref(self) 954 reporef = weakref.ref(self)
955 def validate(tr): 955 def validate(tr):
956 """will run pre-closing hooks""" 956 """will run pre-closing hooks"""
957 pending = lambda: tr.writepending() and self.root or "" 957 pending = lambda: tr.writepending() and self.root or ""
958 reporef().hook('pretxnclose', throw=True, pending=pending, 958 reporef().hook('pretxnclose', throw=True, pending=pending,
959 xnname=desc) 959 xnname=desc, **tr.hookargs)
960 960
961 tr = transaction.transaction(rp, self.sopener, vfsmap, 961 tr = transaction.transaction(rp, self.sopener, vfsmap,
962 "journal", 962 "journal",
963 "undo", 963 "undo",
964 aftertrans(renames), 964 aftertrans(renames),