mercurial/scmutil.py
branchstable
changeset 35009 99ab7bc944d2
parent 34854 39b094e4ae2c
child 35035 96dcc78468e3
--- a/mercurial/scmutil.py	Fri Nov 03 09:27:35 2017 -0700
+++ b/mercurial/scmutil.py	Fri Nov 03 09:27:36 2017 -0700
@@ -610,7 +610,7 @@
 
         origvfs.makedirs(origbackupdir)
 
-    if origvfs.isdir(filepathfromroot):
+    if origvfs.isdir(filepathfromroot) and not origvfs.islink(filepathfromroot):
         ui.note(_('removing conflicting directory: %s\n')
                 % origvfs.join(filepathfromroot))
         origvfs.rmtree(filepathfromroot, forcibly=True)