bundle2: call a hook after the transaction is closed
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 17 Apr 2014 17:59:28 -0400
changeset 21156 2bfb0598206a
parent 21155 148e98e74e25
child 21157 60ad2ea5b106
bundle2: call a hook after the transaction is closed We call a dedicated hook right after closing the transaction. This will let people react to the transaction with all the information in hand. This hook is experimental and will not survive in future versions.
mercurial/exchange.py
--- a/mercurial/exchange.py	Thu Apr 17 17:21:39 2014 -0400
+++ b/mercurial/exchange.py	Thu Apr 17 17:59:28 2014 -0400
@@ -733,6 +733,8 @@
             repo.hook('b2x-pretransactionclose', throw=True, source=source,
                       url=url, pending=p, **tr.hookargs)
             tr.close()
+            repo.hook('b2x-transactionclose', source=source, url=url,
+                      **tr.hookargs)
         else:
             r = changegroup.addchangegroup(repo, cg, source, url)
     finally: