bundle2: allow extensions to extend the getbundle request
We want extensions to be able to request extra parts.
--- a/mercurial/exchange.py Thu Apr 17 17:32:34 2014 -0400
+++ b/mercurial/exchange.py Thu Apr 17 16:56:15 2014 -0400
@@ -578,6 +578,7 @@
kwargs['heads'] = pullop.heads or pullop.rheads
if pullop.heads is None and list(pullop.common) == [nullid]:
pullop.repo.ui.status(_("requesting all changes\n"))
+ _pullbundle2extraprepare(pullop, kwargs)
if kwargs.keys() == ['format']:
return # nothing to pull
bundle = pullop.remote.getbundle('pull', **kwargs)
@@ -588,6 +589,10 @@
assert len(op.records['changegroup']) == 1
pullop.cgresult = op.records['changegroup'][0]['return']
+def _pullbundle2extraprepare(pullop, kwargs):
+ """hook function so that extensions can extend the getbundle call"""
+ pass
+
def _pullchangeset(pullop):
"""pull changeset from unbundle into the local repo"""
# We delay the open of the transaction as late as possible so we