comparison mercurial/commands.py @ 26794:238d21f684b5

unbundle: use 'source' argument with applybundle This will let the hook get access to the 'source' value.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 20 Oct 2015 15:53:07 +0200
parents 13b861d1cce9
children 1760ca4ee919
comparison
equal deleted inserted replaced
26793:f37de5d44aea 26794:238d21f684b5
6564 f = hg.openpath(ui, fname) 6564 f = hg.openpath(ui, fname)
6565 gen = exchange.readbundle(ui, f, fname) 6565 gen = exchange.readbundle(ui, f, fname)
6566 if isinstance(gen, bundle2.unbundle20): 6566 if isinstance(gen, bundle2.unbundle20):
6567 tr = repo.transaction('unbundle') 6567 tr = repo.transaction('unbundle')
6568 try: 6568 try:
6569 op = bundle2.applybundle(repo, gen, tr) 6569 op = bundle2.applybundle(repo, gen, tr, source='unbundle')
6570 tr.close() 6570 tr.close()
6571 except error.BundleUnknownFeatureError as exc: 6571 except error.BundleUnknownFeatureError as exc:
6572 raise error.Abort(_('%s: unknown bundle feature, %s') 6572 raise error.Abort(_('%s: unknown bundle feature, %s')
6573 % (fname, exc), 6573 % (fname, exc),
6574 hint=_("see https://mercurial-scm.org/" 6574 hint=_("see https://mercurial-scm.org/"