mercurial/context.py
changeset 37101 656ac240f392
parent 37084 f0b6fbea00cf
child 37151 05c13e5aa9ec
--- 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)