Mercurial > hg-stable
changeset 26795:dff05b3f47d2
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 20 Oct 2015 15:55:04 +0200 |
parents | 238d21f684b5 |
children | 1760ca4ee919 |
files | mercurial/bundle2.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Tue Oct 20 15:53:07 2015 +0200 +++ b/mercurial/bundle2.py Tue Oct 20 15:55:04 2015 +0200 @@ -302,11 +302,13 @@ 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):