diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -575,6 +575,9 @@ coreconfigitem('merge', 'checkignored', default='abort', ) +coreconfigitem('debug', 'merge.checkpathconflicts', + default=True, +) coreconfigitem('merge', 'followcopies', default=True, ) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -693,6 +693,7 @@ abortconflicts = set() unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown') ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored') + pathconfig = repo.ui.configbool('debug', 'merge.checkpathconflicts') if not force: def collectconflicts(conflicts, config): if config == 'abort': @@ -704,7 +705,7 @@ if m in ('c', 'dc'): if _checkunknownfile(repo, wctx, mctx, f): fileconflicts.add(f) - elif f not in wctx: + elif pathconfig and f not in wctx: path = _checkunknowndirs(repo, f) if path is not None: pathconflicts.add(path) @@ -1139,8 +1140,9 @@ actions[f] = ('dc', (None, f, f, False, pa.node()), "prompt deleted/changed") - # If we are merging, look for path conflicts. - checkpathconflicts(repo, wctx, p2, actions) + if repo.ui.configbool('debug', 'merge.checkpathconflicts'): + # If we are merging, look for path conflicts. + checkpathconflicts(repo, wctx, p2, actions) return actions, diverge, renamedelete