addchangegroup: register data in tr.hookargs
We are registering data related to the process into the transaction hook data.
This lets other parties using the same transaction get informed of the
addchangegroup result.
--- a/mercurial/changegroup.py Thu Apr 17 17:04:59 2014 -0400
+++ b/mercurial/changegroup.py Thu Apr 17 17:09:20 2014 -0400
@@ -673,6 +673,8 @@
if changesets > 0:
p = lambda: cl.writepending() and repo.root or ""
+ if 'node' not in tr.hookargs:
+ tr.hookargs['node'] = hex(cl.node(clstart))
repo.hook('pretxnchangegroup', throw=True,
node=hex(cl.node(clstart)), source=srctype,
url=url, pending=p)