# HG changeset patch # User Pierre-Yves David # Date 1397768175 14400 # Node ID 024f38f6d5f62b6e8de832e169d841eb04a1106f # Parent 8f6530b621774ef855bfc88ba348326db8061bd9 bundle2: allow extensions to extend the getbundle request We want extensions to be able to request extra parts. diff -r 8f6530b62177 -r 024f38f6d5f6 mercurial/exchange.py --- 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