only files in normal state should be marked as deleted
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 02 Nov 2005 16:08:48 -0800
changeset 1488 08c7851969cc
parent 1487 2bc6cd62a29c
child 1489 a64fdaf60f9d
only files in normal state should be marked as deleted fix a traceback when you removed an added file
mercurial/dirstate.py
tests/test-commit
tests/test-commit.out
--- a/mercurial/dirstate.py	Wed Nov 02 15:46:31 2005 -0800
+++ b/mercurial/dirstate.py	Wed Nov 02 16:08:48 2005 -0800
@@ -390,7 +390,7 @@
                         nonexistent = False
                 # XXX: what to do with file no longer present in the fs
                 # who are not removed in the dirstate ?
-                if nonexistent:
+                if nonexistent and type in "nm":
                     deleted.append(fn)
                     continue
             # check the common case first
--- a/tests/test-commit	Wed Nov 02 15:46:31 2005 -0800
+++ b/tests/test-commit	Wed Nov 02 16:08:48 2005 -0800
@@ -11,4 +11,9 @@
 hg commit -d 'foo bar' -m commit-5
 hg commit -d ' 1 4444' -m commit-6
 hg commit -d '111111111111 0' -m commit-7
+
+echo bar > bar
+hg add bar
+rm bar
+hg commit -d "0 0" -m commit-8 2>&1 | sed -e "s:/.*\(/test/.*\):...\1:"
 exit 0
--- a/tests/test-commit.out	Wed Nov 02 15:46:31 2005 -0800
+++ b/tests/test-commit.out	Wed Nov 02 16:08:48 2005 -0800
@@ -13,3 +13,4 @@
 transaction abort!
 rollback completed
 abort: date exceeds 32 bits: 111111111111
+abort: No such file or directory: .../test/bar