Mercurial > hg
changeset 6110:81e20e01d465
status: put added files that have disappeared in the deleted list
This gives the user an indication that something went wrong with this file:
$ hg add foo
$ rm foo
$ hg status foo
! foo
Fixes issue212.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 14 Feb 2008 18:08:16 -0200 |
parents | 242595e612ed |
children | 213ea6eed412 |
files | mercurial/dirstate.py tests/test-commit tests/test-commit.out tests/test-revert tests/test-revert.out |
diffstat | 5 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Thu Feb 14 18:08:16 2008 -0200 +++ b/mercurial/dirstate.py Thu Feb 14 18:08:16 2008 -0200 @@ -568,7 +568,7 @@ nonexistent = False # XXX: what to do with file no longer present in the fs # who are not removed in the dirstate ? - if nonexistent and type_ in "nm": + if nonexistent and type_ in "nma": dadd(fn) continue # check the common case first
--- a/tests/test-commit Thu Feb 14 18:08:16 2008 -0200 +++ b/tests/test-commit Thu Feb 14 18:08:16 2008 -0200 @@ -19,11 +19,12 @@ hg commit -d ' 1 4444' -m commit-6 hg commit -d '111111111111 0' -m commit-7 -echo % partial commit test +echo % commit added file that has been deleted echo bar > bar hg add bar rm bar hg commit -d "1000000 0" -m commit-8 2>&1 | cleanpath +hg commit -d "1000000 0" -m commit-8 bar 2>&1 | cleanpath hg -q revert -a --no-backup
--- a/tests/test-commit.out Thu Feb 14 18:08:16 2008 -0200 +++ b/tests/test-commit.out Thu Feb 14 18:08:16 2008 -0200 @@ -12,9 +12,9 @@ rollback completed abort: invalid date: 'foo bar' nothing changed -% partial commit test -trouble committing bar! -abort: No such file or directory: .../test/bar +% commit added file that has been deleted +nothing changed +abort: file .../test/bar not found! adding dir/file dir/file adding dir.file