Patchwork [08,of,14,FIX-bundle2] strip: pass source and url to bundle2 processing

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 20, 2015, 2:36 p.m.
Message ID <122054fdc36932f18ae6.1445351784@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/11187/
State Accepted
Commit 75d550b7d8f5e2dd20caa82737e24788183c0836
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 1445349693 -7200
#      Tue Oct 20 16:01:33 2015 +0200
# Node ID 122054fdc36932f18ae6af7d66d908718e88a0d1
# Parent  1e5811a59d778df4f38b244376bbc64c673690eb
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 122054fdc369
strip: pass source and url to bundle2 processing

Restoring from a 'bundle2' was missing these data.

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -190,11 +190,12 @@  def strip(ui, repo, nodelist, backup=Tru
             if isinstance(gen, bundle2.unbundle20):
                 tr = repo.transaction('strip')
                 tr.hookargs = {'source': 'strip',
                                'url': 'bundle:' + vfs.join(chgrpfile)}
                 try:
-                    bundle2.processbundle(repo, gen, lambda: tr)
+                    bundle2.applybundle(repo, gen, tr, source='strip',
+                                        url='bundle:' + vfs.join(chgrpfile))
                     tr.close()
                 finally:
                     tr.release()
             else:
                 gen.apply(repo, 'strip', 'bundle:' + vfs.join(chgrpfile), True)