Patchwork D9667: engine: pass upgrade operation inside _clonerevlogs()

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2020, 11:53 a.m.
Message ID <differential-rev-PHID-DREV-gcg34histytha7otnfq4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47978/
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
  Better to pass the operation instead of passing three of it's members (one of
  the them is a function call) separately.
  
  This will also be useful in future when we will like to control which things are
  upgraded.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -159,9 +159,7 @@ 
     srcrepo,
     dstrepo,
     tr,
-    deltareuse,
-    forcedeltabothparents,
-    revlogs=UPGRADE_ALL_REVLOGS,
+    upgrade_op,
 ):
     """Copy revlogs between 2 repos."""
     revcount = 0
@@ -278,9 +276,9 @@ 
             tr,
             oldrl,
             unencoded,
-            deltareuse,
-            forcedeltabothparents,
-            revlogs,
+            upgrade_op.delta_reuse_mode,
+            upgrade_op.has_upgrade_action(b're-delta-multibase'),
+            upgrade_op.revlogs_to_process,
             sidedatacompanion,
             oncopiedrevision,
         )
@@ -319,9 +317,9 @@ 
             tr,
             oldrl,
             unencoded,
-            deltareuse,
-            forcedeltabothparents,
-            revlogs,
+            upgrade_op.delta_reuse_mode,
+            upgrade_op.has_upgrade_action(b're-delta-multibase'),
+            upgrade_op.revlogs_to_process,
             sidedatacompanion,
             oncopiedrevision,
         )
@@ -359,9 +357,9 @@ 
             tr,
             oldrl,
             unencoded,
-            deltareuse,
-            forcedeltabothparents,
-            revlogs,
+            upgrade_op.delta_reuse_mode,
+            upgrade_op.has_upgrade_action(b're-delta-multibase'),
+            upgrade_op.revlogs_to_process,
             sidedatacompanion,
             oncopiedrevision,
         )
@@ -452,9 +450,7 @@ 
             srcrepo,
             dstrepo,
             tr,
-            upgrade_op.delta_reuse_mode,
-            upgrade_op.has_upgrade_action(b're-delta-multibase'),
-            revlogs=upgrade_op.revlogs_to_process,
+            upgrade_op,
         )
 
     # Now copy other files in the store directory.