From patchwork Wed Sep 23 08:18:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3, of, 9] merge: check new filenode creation config before disabling optimization From: Pulkit Goyal <7895pulkit@gmail.com> X-Patchwork-Id: 47249 Message-Id: <967306618158321fb936.1600849098@workspace> To: mercurial-devel@mercurial-scm.org Date: Wed, 23 Sep 2020 13:48:18 +0530 # HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1600074612 -19800 # Mon Sep 14 14:40:12 2020 +0530 # Node ID 967306618158321fb9367c02fe12d1fe52aacb29 # Parent 2f20d3b618ac474fd9341b86fa4f8e5791b66290 # EXP-Topic merge-newnode merge: check new filenode creation config before disabling optimization Let's make sure that the config is also enabled before disabling the `m2-vs-ma` optimization. Differential Revision: https://phab.mercurial-scm.org/D9027 diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -776,7 +776,13 @@ def manifestmerge( # - ma is the same as m1 or m2, which we're just going to diff again later # - The caller specifically asks for a full diff, which is useful during bid # merge. - if pa not in ([wctx, p2] + wctx.parents()) and not forcefulldiff: + # - we are tracking salvaged files specifically hence should process all + # files + if ( + pa not in ([wctx, p2] + wctx.parents()) + and not forcefulldiff + and repo.ui.configbool(b'experimental', b'merge-track-salvaged') + ): # Identify which files are relevant to the merge, so we can limit the # total m1-vs-m2 diff to just those files. This has significant # performance benefits in large repositories.