changeset 21159:024f38f6d5f6

bundle2: allow extensions to extend the getbundle request We want extensions to be able to request extra parts.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 17 Apr 2014 16:56:15 -0400
parents 8f6530b62177
children 564f55b25122 b04a2f49cb55
files mercurial/exchange.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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