diff mercurial/repair.py @ 33039:b82615afde65

bundle: add a applybundle1() method This is one step towards removing a bunch of "if isinstance(gen, unbundle20)" by treating bundle1 and bundle2 more similarly. The name may sounds ironic for a method in the bundle2 module, but I didn't think it was worth it yet to create a new 'bundle' module that depends on the 'bundle2' module. Besides, we'll inline the method again later.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 16 Jun 2017 10:25:11 -0700
parents 8e3021fd1a44
children dbc2ee17053e
line wrap: on
line diff
--- a/mercurial/repair.py	Thu Jun 22 15:59:07 2017 -0700
+++ b/mercurial/repair.py	Fri Jun 16 10:25:11 2017 -0700
@@ -214,7 +214,8 @@
             else:
                 txnname = "strip\n%s" % util.hidepassword(tmpbundleurl)
                 with repo.transaction(txnname) as tr:
-                    gen.apply(repo, tr, 'strip', tmpbundleurl, True)
+                    bundle2.applybundle1(repo, gen, tr, 'strip', tmpbundleurl,
+                                         emptyok=True)
             if not repo.ui.verbose:
                 repo.ui.popbuffer()
             f.close()