prechangegroup: use hook argument from the transaction
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 14 Oct 2014 00:43:20 -0700
changeset 22970 d82e2223f132
parent 22969 805c18b27f48
child 22971 3fe571c74b27
prechangegroup: use hook argument from the transaction There can be useful data in there (eg: bundle2 related one)
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Tue Oct 14 00:09:25 2014 -0700
+++ b/mercurial/changegroup.py	Tue Oct 14 00:43:20 2014 -0700
@@ -603,7 +603,8 @@
 
     tr = repo.transaction("\n".join([srctype, util.hidepassword(url)]))
     try:
-        repo.hook('prechangegroup', throw=True, source=srctype, url=url)
+        repo.hook('prechangegroup', throw=True, source=srctype, url=url,
+                  **tr.hookargs)
 
         trp = weakref.proxy(tr)
         # pull off the changeset group