diff mercurial/util.py @ 5487:7a64931e2d76

Fix file-changed-to-dir and dir-to-file commits (issue660). Allow adding to dirstate files that clash with previously existing but marked for removal. Protect from reintroducing clashes by revert. This change doesn't address related issues with update. Current workaround is to do "clean" update by manually removing conflicting files/dirs from working directory.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 05 Nov 2007 20:05:44 +0300
parents 003d1f174fe1
children dcbda0c4c3eb
line wrap: on
line diff
--- a/mercurial/util.py	Sat Nov 03 17:04:42 2007 +0100
+++ b/mercurial/util.py	Mon Nov 05 20:05:44 2007 +0300
@@ -720,7 +720,7 @@
             except OSError, err:
                 # EINVAL can be raised as invalid path syntax under win32.
                 # They must be ignored for patterns can be checked too.
-                if err.errno not in (errno.ENOENT, errno.EINVAL):
+                if err.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL):
                     raise
             else:
                 if stat.S_ISLNK(st.st_mode):