[PATCH 07 of 14 FIX-bundle2] unbundle: use 'url' argument with applybundle
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Oct 20 09:36:23 CDT 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1445349382 -7200
# Tue Oct 20 15:56:22 2015 +0200
# Node ID 1e5811a59d778df4f38b244376bbc64c673690eb
# Parent 6a047ac5272421588ec1ac05bb27a37b97d02998
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
# hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 1e5811a59d77
unbundle: use 'url' argument with applybundle
This will let the hook get access to the 'url' value.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6529,11 +6529,12 @@ def unbundle(ui, repo, fname1, *fnames,
f = hg.openpath(ui, fname)
gen = exchange.readbundle(ui, f, fname)
if isinstance(gen, bundle2.unbundle20):
tr = repo.transaction('unbundle')
try:
- op = bundle2.applybundle(repo, gen, tr, source='unbundle')
+ op = bundle2.applybundle(repo, gen, tr, source='unbundle',
+ url='bundle:' + fname)
tr.close()
except error.BundleUnknownFeatureError as exc:
raise error.Abort(_('%s: unknown bundle feature, %s')
% (fname, exc),
hint=_("see https://mercurial-scm.org/"
More information about the Mercurial-devel
mailing list