[PATCH 02 of 14 FIX-bundle2] unbundle: use 'bundle2.applybundle'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Oct 20 09:36:18 CDT 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1445348840 -7200
#      Tue Oct 20 15:47:20 2015 +0200
# Node ID 00ab5df11ddd122686a34101b91e2ea15088da13
# Parent  93a27c3e16d0ec1904a50757a5503ca97174aac0
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 00ab5df11ddd
unbundle: use 'bundle2.applybundle'

This is one of such place.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6529,11 +6529,11 @@ 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.processbundle(repo, gen, lambda: tr)
+                    op = bundle2.applybundle(repo, gen, tr)
                     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