comparison mercurial/merge.py @ 45468:09edbff6ae8d

merge: store ACTION_KEEP_ABSENT when we are keeping the file absent locally If a file is not present on the local side, and it's unchanged between other merge parent and ancestor, we don't use any action, neither we had a if-else branch for that condition. This leads to bid-merge missing that there is a such action possible which can be performed. As test changes demonstrate, we now choose the locally deleted side instead of choosing the remote one consistently. This is also wrong behavior which is resulted because of missing possible action. It will be fixed in next patch. This whole logic is not acurrate as we should prompt user on what to do when this kind of criss-cross merge is in play. Differential Revision: https://phab.mercurial-scm.org/D8940
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 24 Aug 2020 15:20:09 +0530
parents bb9888d32601
children 49ffaa4f65f6
comparison
equal deleted inserted replaced
45467:bb9888d32601 45468:09edbff6ae8d
1021 f, 1021 f,
1022 mergestatemod.ACTION_DELETED_CHANGED, 1022 mergestatemod.ACTION_DELETED_CHANGED,
1023 (None, f, f, False, pa.node()), 1023 (None, f, f, False, pa.node()),
1024 b'prompt deleted/changed', 1024 b'prompt deleted/changed',
1025 ) 1025 )
1026 else:
1027 mresult.addfile(
1028 f,
1029 mergestatemod.ACTION_KEEP_ABSENT,
1030 None,
1031 b'local not present, remote unchanged',
1032 )
1026 1033
1027 if repo.ui.configbool(b'experimental', b'merge.checkpathconflicts'): 1034 if repo.ui.configbool(b'experimental', b'merge.checkpathconflicts'):
1028 # If we are merging, look for path conflicts. 1035 # If we are merging, look for path conflicts.
1029 checkpathconflicts(repo, wctx, p2, mresult) 1036 checkpathconflicts(repo, wctx, p2, mresult)
1030 1037