Issue31

Title commit: if a file marked for removal is present, it isn't removed
Priority bug Status resolved
Superseder Nosy List mpm, tonfa
Assigned To Topics

Created on 2005-10-25.00:11:14 by mpm, last changed 2005-11-18.15:23:45 by ThomasAH.

Files
File name Uploaded Type Edit Remove
2.diff tonfa, 2005-10-25.12:31:29 text/x-patch
Messages
msg217 (view) Author: ThomasAH Date: 2005-11-18.15:23:45
works for me, too.
msg90 (view) Author: tonfa Date: 2005-10-28.10:35:14
Matt, it looks like the dirstate.changes rewrite fixed this:
tonfa@arakou /tmp/xxxxx/truc $ hg init
tonfa@arakou /tmp/xxxxx/truc $ hg commit -A -m m
adding a
tonfa@arakou /tmp/xxxxx/truc $ hg status
tonfa@arakou /tmp/xxxxx/truc $ hg rm a
tonfa@arakou /tmp/xxxxx/truc $ hg status
R a
tonfa@arakou /tmp/xxxxx/truc $ touch a
tonfa@arakou /tmp/xxxxx/truc $ hg status
R a
tonfa@arakou /tmp/xxxxx/truc $ hg ci -m m
tonfa@arakou /tmp/xxxxx/truc $ hg status
? a
tonfa@arakou /tmp/xxxxx/truc $ hg manifest
tonfa@arakou /tmp/xxxxx/truc $
msg66 (view) Author: tonfa Date: 2005-10-26.14:16:45
i cannot reproduce it with this patch (simplify of dirstate changes function):
http://www.selenic.com/pipermail/mercurial/2005-October/005167.html
msg47 (view) Author: mpm Date: 2005-10-25.19:57:46
Hmm. Don't think this is quite the bug I was describing. Here's the message:

Mercurial seems to temporarily lose track of the fact that a file was
just removed if you recreate the file before the removal is checked-in.
Is this behavior correct?

Here is an example:

eric2@thud:~$ touch foobar
eric2@thud:~$ hg add foobar
eric2@thud:~$ hg ci -m"bletch" foobar
eric2@thud:~$ hg status
eric2@thud:~$ hg rm foobar
eric2@thud:~$ ls -l foobar
ls: foobar: No such file or directory
eric2@thud:~$ hg status
R foobar
eric2@thud:~$ touch foobar
eric2@thud:~$ hg status
? foobar
eric2@thud:~$ hg ci
nothing changed
eric2@thud:~$ rm foobar
eric2@thud:~$ hg status
R foobar
eric2@thud:~$
msg44 (view) Author: tonfa Date: 2005-10-25.12:31:29
The attached patch fix that. But i don't really think this is a bug, i would
prefer mercurial not to touch files like this.

What was the reason for hg rm to remove the file in the fs ? Couldn't it be an
option ?
History
Date User Action Args
2005-11-18 15:23:45ThomasAHsetstatus: testing -> resolved
nosy: mpm, tonfa
messages: + msg217
2005-11-03 05:38:45mpmsetstatus: chatting -> testing
nosy: mpm, tonfa
2005-10-28 10:35:14tonfasetnosy: mpm, tonfa
messages: + msg90
2005-10-26 14:16:46tonfasetnosy: mpm, tonfa
messages: + msg66
2005-10-25 19:57:47mpmsetnosy: mpm, tonfa
messages: + msg47
2005-10-25 12:31:52tonfasetnosy: + tonfa
2005-10-25 12:31:31tonfasetfiles: + 2.diff
status: unread -> chatting
messages: + msg44
2005-10-25 00:11:14mpmcreate