darcs

Issue 1316 amend-record: files/dirs still in pending even if they are removed

Title amend-record: files/dirs still in pending even if they are removed
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kolibrie, kowey, thorkilnaur
Assigned To
Topics ThePendingPatch

Created on 2009-01-15.15:11:39 by kolibrie, last changed 2020-07-29.09:21:11 by bfrk.

Files
File name Uploaded Type Edit Remove
failing-issue1316.sh kowey, 2009-08-16.22:18:51 application/octet-stream
Messages
msg7106 (view) Author: kolibrie Date: 2009-01-15.15:11:36
I have tried the following with both --old-fashioned-inventory and
--darcs-2, and both list files in _darcs/patches/pending that darcs
thinks should be added, when in fact, I just deleted them and removed
them from the only patch that knew about them.

darcs init --darcs-2
mkdir a
mkdir b
touch a/1
touch a/2
touch b/3
touch b/4
darcs add -r a
darcs add -r b
darcs record -m 'initial' --all --author testing
cat _darcs/patches/pending
rm -rf b
echo y | darcs amend-record -m 'initial' --all
cat _darcs/patches/pending
echo 'why are this directory and its files listed in pending?'

I was using darcs 2.2.pre2.  I have not checked the current release
candidate.

I came across this because I accidentally added a directory that I did
not want to track in a repository.  I immediately amend-recorded the
patch, and was amazed to see that 'darcs whatsnew -s' said that I had
added the directory and files that I had just deleted.

-kolibrie
msg7631 (view) Author: kowey Date: 2009-04-09.12:00:21
Is the behaviour you are expecting for darcs to detect that the file (in
pending) is no longer in the working directory?  That sounds reasonable to me.  

Could you submit a test case?
See http://wiki.darcs.net/index.html/RegressionTests for details
msg8187 (view) Author: kowey Date: 2009-08-16.22:18:51
Hi Nathan,

For what it's worth, I don't think the repository format makes a difference here.  

I've been looking into this a bit (see also issue1325) and have managed to boil
down your example to just the directory.  Does the attached test capture the bug
to your satisfaction?

I'm wondering also if one could make a case that this behaviour would be
desirable.  I don't think so, though...
Attachments
msg10511 (view) Author: kowey Date: 2010-03-25.11:44:31
Hi Nathan, do you have a moment to try the test attached to this tracker
and let me know if captures the essence of your bug?  Thanks!
msg15961 (view) Author: kowey Date: 2012-08-09.14:57:29
I'm going to assume that my test (which I've submitted to Darcs) boils 
down Nathan's one correctly, moreover that this should be considered a 
bug.  Interesting
msg22279 (view) Author: bfrk Date: 2020-07-29.09:21:07
resolved by

patch ffa25a85a94ebb4ec8ac856fdb33135387cb34e4
Author: Ben Franksen <ben.franksen@online.de>
Date:   Mon Jul  2 15:40:08 CEST 2018
  * fix handling of pending patch in amend command
History
Date User Action Args
2009-01-15 15:11:39kolibriecreate
2009-04-09 12:00:26koweysetstatus: unread -> unknown
topic: + ThePendingPatch
title: amend-record and patches pending -> files/dirs still in pending even if they are removed
nosy: kowey, simon, thorkilnaur, kolibrie, dmitry.kurochkin
messages: + msg7631
priority: bug
2009-08-16 22:18:54koweysetstatus: unknown -> waiting-for
files: + failing-issue1316.sh
title: files/dirs still in pending even if they are removed -> amend-record: files/dirs still in pending even if they are removed
nosy: kowey, simon, thorkilnaur, kolibrie, dmitry.kurochkin
messages: + msg8187
assignedto: kolibrie
2009-08-25 17:39:17adminsetnosy: + darcs-devel, - simon
2009-08-27 14:24:51adminsetnosy: kowey, darcs-devel, thorkilnaur, kolibrie, dmitry.kurochkin
2010-03-25 11:44:33koweysetmessages: + msg10511
2012-08-09 14:57:30koweysetstatus: waiting-for -> needs-diagnosis/design
assignedto: kolibrie ->
messages: + msg15961
2020-07-29 09:21:11bfrksetstatus: needs-diagnosis/design -> resolved
messages: + msg22279