# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1609326229 -19800 # Node ID 02df91e895bdc637aaf674e33576b810caa675f5 # Parent 34efa84a43a10b78c19008b35ef28ca3ef4ae56d engine: pass upgrade operation inside `_perform_clone()` Same as previous patch. Differential Revision: https://phab.mercurial-scm.org/D9668 diff -r 34efa84a43a1 -r 02df91e895bd mercurial/upgrade_utils/engine.py --- a/mercurial/upgrade_utils/engine.py Wed Dec 30 16:29:33 2020 +0530 +++ b/mercurial/upgrade_utils/engine.py Wed Dec 30 16:33:49 2020 +0530 @@ -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, )