Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 45580:76d79b80d953
merge: disable `m2-vs-ma` optimization if new filenode config is true
The `m2-vs-ma` optimization filters out the file which have not changed between
second parent and the ancestor of the merge. This results in the m1-vs-m2 diff
not processing those files. These files will be required when we are creating
new filenode for salvaged cases as we need to track them to store in mergestate
that file can be salvaged.
Differential Revision: https://phab.mercurial-scm.org/D9027
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 14 Sep 2020 14:40:12 +0530 |
parents | c1b603cdc95a |
children | 4c8a93ec6908 |
comparison
equal
deleted
inserted
replaced
45579:b9d6ab6cdeb4 | 45580:76d79b80d953 |
---|---|
774 | 774 |
775 # Don't use m2-vs-ma optimization if: | 775 # Don't use m2-vs-ma optimization if: |
776 # - ma is the same as m1 or m2, which we're just going to diff again later | 776 # - ma is the same as m1 or m2, which we're just going to diff again later |
777 # - The caller specifically asks for a full diff, which is useful during bid | 777 # - The caller specifically asks for a full diff, which is useful during bid |
778 # merge. | 778 # merge. |
779 if pa not in ([wctx, p2] + wctx.parents()) and not forcefulldiff: | 779 # - we are tracking salvaged files specifically hence should process all |
780 # files | |
781 if ( | |
782 pa not in ([wctx, p2] + wctx.parents()) | |
783 and not forcefulldiff | |
784 and not repo.ui.configbool(b'experimental', b'merge-track-salvaged') | |
785 ): | |
780 # Identify which files are relevant to the merge, so we can limit the | 786 # Identify which files are relevant to the merge, so we can limit the |
781 # total m1-vs-m2 diff to just those files. This has significant | 787 # total m1-vs-m2 diff to just those files. This has significant |
782 # performance benefits in large repositories. | 788 # performance benefits in large repositories. |
783 relevantfiles = set(ma.diff(m2).keys()) | 789 relevantfiles = set(ma.diff(m2).keys()) |
784 | 790 |