Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
5486:48c22c719f8c | 5487:7a64931e2d76 |
---|---|
718 try: | 718 try: |
719 st = os.lstat(curpath) | 719 st = os.lstat(curpath) |
720 except OSError, err: | 720 except OSError, err: |
721 # EINVAL can be raised as invalid path syntax under win32. | 721 # EINVAL can be raised as invalid path syntax under win32. |
722 # They must be ignored for patterns can be checked too. | 722 # They must be ignored for patterns can be checked too. |
723 if err.errno not in (errno.ENOENT, errno.EINVAL): | 723 if err.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL): |
724 raise | 724 raise |
725 else: | 725 else: |
726 if stat.S_ISLNK(st.st_mode): | 726 if stat.S_ISLNK(st.st_mode): |
727 raise Abort(_('path %r traverses symbolic link %r') % | 727 raise Abort(_('path %r traverses symbolic link %r') % |
728 (path, prefix)) | 728 (path, prefix)) |