diff -r 9e6d3465f17e -r 656ac240f392 mercurial/context.py --- a/mercurial/context.py Sat Mar 24 13:02:27 2018 +0900 +++ b/mercurial/context.py Sat Mar 24 01:30:50 2018 -0400 @@ -1808,10 +1808,11 @@ wvfs.audit(f) if wvfs.isdir(f) and not wvfs.islink(f): wvfs.rmtree(f, forcibly=True) - for p in reversed(list(util.finddirs(f))): - if wvfs.isfileorlink(p): - wvfs.unlink(p) - break + if self._repo.ui.configbool('experimental', 'merge.checkpathconflicts'): + for p in reversed(list(util.finddirs(f))): + if wvfs.isfileorlink(p): + wvfs.unlink(p) + break def setflags(self, l, x): self._repo.wvfs.setflags(self._path, l, x)