# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1609325973 -19800 # Node ID 34efa84a43a10b78c19008b35ef28ca3ef4ae56d # Parent 82f3ee1a505f450a42b441b5e8c2960774ff8f59 engine: pass upgrade operation inside _clonerevlogs() 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. Differential Revision: https://phab.mercurial-scm.org/D9667 diff -r 82f3ee1a505f -r 34efa84a43a1 mercurial/upgrade_utils/engine.py --- a/mercurial/upgrade_utils/engine.py Wed Dec 30 16:20:25 2020 +0530 +++ b/mercurial/upgrade_utils/engine.py Wed Dec 30 16:29:33 2020 +0530 @@ -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.