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

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 20, 2015, 2:36 p.m.
Message ID <00ab5df11ddd122686a3.1445351778@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/11183/
State Accepted
Commit 13b861d1cce9d6bf2df879ffc782ad3e2dbdef6c
Headers show

Comments

Pierre-Yves David - Oct. 20, 2015, 2:36 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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/"