# HG changeset patch # User Pulkit Goyal <7895pul...@gmail.com> # Date 1600074083 -19800 # Mon Sep 14 14:31:23 2020 +0530 # Node ID 2f20d3b618ac474fd9341b86fa4f8e5791b66290 # Parent 172ab535796f7cc34ef113a73aa95eb50aaf3f31 # EXP-Topic merge-newnode configitems: add a new config option to control new filenode functionality
This series is adding functionality where we can force create a new filenode for some files on a merge-commit. This is meant to represent an explicit choice made by user and hence distingusing the file in the merged commit with the file in parent by creating a new filenode instead of using the parent one. This introduces a experimental config option under which this functionality will be hidden. Differential Revision: https://phab.mercurial-scm.org/D9026 diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -590,6 +590,11 @@ coreconfigitem( coreconfigitem( b'experimental', b'maxdeltachainspan', default=-1, ) +# tracks files which were undeleted (merge might delete them but we explicitly +# kept/undeleted them) and creates new filenodes for them +coreconfigitem( + b'experimental', b'merge-track-salvaged', default=False, +) coreconfigitem( b'experimental', b'mergetempdirprefix', default=None, ) diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t --- a/tests/test-merge-criss-cross.t +++ b/tests/test-merge-criss-cross.t @@ -486,6 +486,14 @@ Following test cases demonstrate how mer explicit choices made by users to revert the removal and on criss-cross merging removes the file again. +Enable the config option +------------------------ + + $ cat >> $HGRCPATH <<EOF + > [experimental] + > merge-track-salvaged = True + > EOF + "Simple" case where the filenode changes ---------------------------------------- _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel