changeset 21156:2bfb0598206a

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 17 Apr 2014 17:59:28 -0400
parents 148e98e74e25
children 60ad2ea5b106
files mercurial/exchange.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: