Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 44835:09da5cf44772
hooks: provide access to transaction changes for internal hooks
External hooks are skipped here as the environment often has a size
limit in the low MBs and that can easily be reached by larger
transactions.
Differential Revision: https://phab.mercurial-scm.org/D8490
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Fri, 01 May 2020 01:32:08 +0200 |
parents | d36283e20833 |
children | fd3b94f1712d |
comparison
equal
deleted
inserted
replaced
44834:be6401a25726 | 44835:09da5cf44772 |
---|---|
2241 tr.changes[b'phases'] = [] | 2241 tr.changes[b'phases'] = [] |
2242 tr.changes[b'bookmarks'] = {} | 2242 tr.changes[b'bookmarks'] = {} |
2243 | 2243 |
2244 tr.hookargs[b'txnid'] = txnid | 2244 tr.hookargs[b'txnid'] = txnid |
2245 tr.hookargs[b'txnname'] = desc | 2245 tr.hookargs[b'txnname'] = desc |
2246 tr.hookargs[b'changes'] = tr.changes | |
2246 # note: writing the fncache only during finalize mean that the file is | 2247 # note: writing the fncache only during finalize mean that the file is |
2247 # outdated when running hooks. As fncache is used for streaming clone, | 2248 # outdated when running hooks. As fncache is used for streaming clone, |
2248 # this is not expected to break anything that happen during the hooks. | 2249 # this is not expected to break anything that happen during the hooks. |
2249 tr.addfinalize(b'flush-fncache', self.store.write) | 2250 tr.addfinalize(b'flush-fncache', self.store.write) |
2250 | 2251 |