##// END OF EJS Templates
hooks: provide access to transaction changes for internal hooks...
Joerg Sonnenberger -
r45350:09da5cf4 default
parent child Browse files
Show More
@@ -158,6 +158,10 b' def _exthook(ui, repo, htype, name, cmd,'
158 158 env[b'HG_HOOKNAME'] = name
159 159
160 160 for k, v in pycompat.iteritems(args):
161 # transaction changes can accumulate MBs of data, so skip it
162 # for external hooks
163 if k == b'changes':
164 continue
161 165 if callable(v):
162 166 v = v()
163 167 if isinstance(v, (dict, list)):
@@ -2243,6 +2243,7 b' class localrepository(object):'
2243 2243
2244 2244 tr.hookargs[b'txnid'] = txnid
2245 2245 tr.hookargs[b'txnname'] = desc
2246 tr.hookargs[b'changes'] = tr.changes
2246 2247 # note: writing the fncache only during finalize mean that the file is
2247 2248 # outdated when running hooks. As fncache is used for streaming clone,
2248 2249 # this is not expected to break anything that happen during the hooks.
@@ -443,7 +443,7 b' more there after'
443 443 HG_PENDING=$TESTTMP/a
444 444
445 445 transaction abort!
446 txnabort Python hook: txnid,txnname
446 txnabort Python hook: changes,txnid,txnname
447 447 txnabort hook: HG_HOOKNAME=txnabort.1
448 448 HG_HOOKTYPE=txnabort
449 449 HG_TXNID=TXN:$ID$
General Comments 0
You need to be logged in to leave comments. Login now