Patchwork D9668: engine: pass upgrade operation inside `_perform_clone()`

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2020, 11:53 a.m.
Message ID <differential-rev-PHID-DREV-sgc544rdnvgxrxohs4mp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47979/
State Superseded
Headers show

Comments

phabricator - Dec. 30, 2020, 11:53 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Same as previous patch.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9668

AFFECTED FILES
  mercurial/upgrade_utils/engine.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/upgrade_utils/engine.py b/mercurial/upgrade_utils/engine.py
--- a/mercurial/upgrade_utils/engine.py
+++ b/mercurial/upgrade_utils/engine.py
@@ -124,15 +124,13 @@ 
     tr,
     old_revlog,
     unencoded,
-    deltareuse,
-    forcedeltabothparents,
-    revlogs,
+    upgrade_op,
     sidedatacompanion,
     oncopiedrevision,
 ):
     """ returns the new revlog object created"""
     newrl = None
-    if matchrevlog(revlogs, unencoded):
+    if matchrevlog(upgrade_op.revlogs_to_process, unencoded):
         ui.note(
             _(b'cloning %d revisions from %s\n') % (len(old_revlog), unencoded)
         )
@@ -141,8 +139,10 @@ 
             tr,
             newrl,
             addrevisioncb=oncopiedrevision,
-            deltareuse=deltareuse,
-            forcedeltabothparents=forcedeltabothparents,
+            deltareuse=upgrade_op.delta_reuse_mode,
+            forcedeltabothparents=upgrade_op.has_upgrade_action(
+                b're-delta-multibase'
+            ),
             sidedatacompanion=sidedatacompanion,
         )
     else:
@@ -276,9 +276,7 @@ 
             tr,
             oldrl,
             unencoded,
-            upgrade_op.delta_reuse_mode,
-            upgrade_op.has_upgrade_action(b're-delta-multibase'),
-            upgrade_op.revlogs_to_process,
+            upgrade_op,
             sidedatacompanion,
             oncopiedrevision,
         )
@@ -317,9 +315,7 @@ 
             tr,
             oldrl,
             unencoded,
-            upgrade_op.delta_reuse_mode,
-            upgrade_op.has_upgrade_action(b're-delta-multibase'),
-            upgrade_op.revlogs_to_process,
+            upgrade_op,
             sidedatacompanion,
             oncopiedrevision,
         )
@@ -357,9 +353,7 @@ 
             tr,
             oldrl,
             unencoded,
-            upgrade_op.delta_reuse_mode,
-            upgrade_op.has_upgrade_action(b're-delta-multibase'),
-            upgrade_op.revlogs_to_process,
+            upgrade_op,
             sidedatacompanion,
             oncopiedrevision,
         )