# HG changeset patch # User Pierre-Yves David # Date 2015-10-20 13:55:04 # Node ID dff05b3f47d22b52487457abcd4eff22797f4195 # Parent 238d21f684b57194f0ab653e2c2473151021d3ac applybundle: take url as argument We allow specifying the url to carry it to hooks. This gets us closer to 'bundle1.apply(...)' and will allow us to remove regressions in multiple place where we forget to pass the url to hooks. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -302,11 +302,13 @@ def _notransaction(): to be created""" raise TransactionUnavailable() -def applybundle(repo, unbundler, tr, source=None, op=None): +def applybundle(repo, unbundler, tr, source=None, url=None, op=None): # transform me into unbundler.apply() as soon as the freeze is lifted tr.hookargs['bundle2'] = '1' if source is not None and 'source' not in tr.hookargs: tr.hookargs['source'] = source + if url is not None and 'url' not in tr.hookargs: + tr.hookargs['url'] = url return processbundle(repo, unbundler, lambda: tr, op=op) def processbundle(repo, unbundler, transactiongetter=None, op=None):