Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 26791:13b861d1cce9
unbundle: use 'bundle2.applybundle'
This is one such place.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 20 Oct 2015 15:47:20 +0200 |
parents | e6003ecf3257 |
children | 238d21f684b5 |
comparison
equal
deleted
inserted
replaced
26790:28a6c2d72097 | 26791:13b861d1cce9 |
---|---|
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.processbundle(repo, gen, lambda: tr) | 6569 op = bundle2.applybundle(repo, gen, tr) |
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/" |