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

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


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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)


More information about the Mercurial-devel mailing list