darcs

Issue 1012 rm/record/unrecord/record => inconsistent repository, Cannot remove non-empty file (2.0.2+70)

Title rm/record/unrecord/record => inconsistent repository, Cannot remove non-empty file (2.0.2+70)
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, nwf, simonmar, t-jodias, thorkilnaur
Assigned To
Topics ThePendingPatch

Created on 2008-08-18.09:30:48 by simonmar, last changed 2009-10-23.23:36:03 by admin.

Messages
msg5574 (view) Author: simonmar Date: 2008-08-18.09:30:46
This script demonstrates the bug:

----------------------
#!/bin/sh
set -v
rm -rf test
mkdir test
cd test
darcs2 --version
darcs2 init
echo test >File.hs
darcs2 add File.hs
darcs2 record File.hs -a -m "add File"
rm File.hs
darcs2 record -a -m "rm File"
darcs2 cha
darcs2 unrecord -p "rm File" -a
darcs2 cha
darcs2 record -a -m "re-rm File"
----------------------

Here's the output:

rm -rf test
mkdir test
cd test
darcs2 --version
2.0.2 (+ 70 patches)
darcs2 init
echo test >File.hs
darcs2 add File.hs
darcs2 record File.hs -a -m "add File"
Recording changes in "File.hs":

Finished recording patch 'add File'
rm File.hs
darcs2 record -a -m "rm File"
Finished recording patch 'rm File'
darcs2 cha
Mon Aug 18 10:26:59 BST 2008  Simon Marlow <marlowsd@gmail.com>
  * rm File

    R ./File.hs

Mon Aug 18 10:26:59 BST 2008  Simon Marlow <marlowsd@gmail.com>
  * add File

    A ./File.hs
darcs2 unrecord -p "rm File" -a
Finished unrecording.
darcs2 cha
Mon Aug 18 10:26:59 BST 2008  Simon Marlow <marlowsd@gmail.com>
  * add File

    A ./File.hs
darcs2 record -a -m "re-rm File"

darcs failed:  Cannot remove non-empty file ./File.hs
Your repository is now in an inconsistent state.
This must be fixed by running darcs repair.

Failed to record patch 're-rm File'
msg5577 (view) Author: kowey Date: 2008-08-18.10:29:33
I have submitted this as bugs/issue1012_unrecord_remove.sh.  Thanks!

By the way, if you are so inclined, submitting bugs as patches is easy.  Just
stick the shell script in bugs/ add, record and send!  There is virtually no
bureaucracy to put in the scripts either.  Bash and set -ev is all you need :-D
[oh and don't worry about names either, we can take of that stuff]
msg5594 (view) Author: kowey Date: 2008-08-19.07:15:06
John: does darcs repair allow you to move on?
msg5596 (view) Author: t-jodias Date: 2008-08-19.10:08:57
I ran darcs repair, and it seemed to work, but it took at least a few hours (I 
had to leave it running overnight). But when I tried to record the last patch 
again, it failed with the same error.

I had another copy of the repository from which I moved on.
msg5613 (view) Author: nwf Date: 2008-08-19.23:18:11
Is this a dupe of issue693?  msg3418 suggests that that issue also stems from
unrecording.
msg5664 (view) Author: kowey Date: 2008-08-23.08:18:29
On Tue, Aug 19, 2008 at 23:18:13 -0000, Nathaniel Filardo wrote:
> Is this a dupe of issue693?  msg3418 suggests that that issue also stems from
> unrecording.

This appears to be a different bug.

I ran the test this morning by creating a file bugs/tests_to_run with
the line
  issue1012_unrecord_remove.sh

I then went into bugs-shell-old-fashioned.dir/test (the test directory
is created by the issue1012 script) and performed a darcs check.  The
repository was consistent; no removal-of-nonempty-file patches there.

Interestingly, the test passes on hashed and format-2 repositories.
msg6017 (view) Author: droundy Date: 2008-09-16.17:53:54
The following patch updated the status of issue1012 to be resolved:

* resolve issue1012: it seems to be fixed by the fix for issue709.
History
Date User Action Args
2008-08-18 09:30:48simonmarcreate
2008-08-18 10:29:35koweysetpriority: bug
nosy: + kowey
status: unread -> unknown
messages: + msg5577
2008-08-19 07:12:11koweysetnosy: beschmi, kowey, dagit, simonmar
title: unrecord/record file remove bug -> rm/record/unrecord/record => inconsistent repository, Cannot remove non-empty file (2.0.2+70)
2008-08-19 07:13:57koweysetnosy: + t-jodias
2008-08-19 07:14:36koweylinkissue1021 superseder
2008-08-19 07:15:08koweysetnosy: beschmi, kowey, dagit, simonmar, t-jodias
messages: + msg5594
2008-08-19 10:08:59diassetnosy: + dias
messages: + msg5596
2008-08-19 23:18:13nwfsetnosy: + nwf
messages: + msg5613
2008-08-23 08:18:31koweysetnosy: beschmi, kowey, dagit, simonmar, nwf, t-jodias, dias
messages: + msg5664
2008-08-30 14:15:12koweysettopic: + ThePendingPatch
nosy: beschmi, kowey, dagit, simonmar, nwf, t-jodias, dias
2008-09-16 17:53:56droundysetstatus: unknown -> resolved-in-unstable
nosy: + droundy
messages: + msg6017
2009-04-22 03:32:27twbsetstatus: resolved-in-unstable -> resolved
nosy: + dmitry.kurochkin, simon, thorkilnaur
2009-08-06 18:00:14adminsetnosy: + markstos, jast, Serware, darcs-devel, zooko, mornfall, tommy, - droundy, simonmar, nwf, t-jodias, dias
2009-08-06 21:11:29adminsetnosy: - beschmi
2009-08-10 21:42:30adminsetnosy: + dias, t-jodias, simonmar, nwf, - tommy, markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:42:54adminsetnosy: - dagit
2009-08-25 17:44:19adminsetnosy: + darcs-devel, - simon
2009-08-27 14:18:42adminsetnosy: kowey, darcs-devel, simonmar, thorkilnaur, dmitry.kurochkin, nwf, t-jodias, dias
2009-10-23 22:37:36adminsetnosy: + marlowsd, - simonmar
2009-10-23 22:47:10adminsetnosy: - dias
2009-10-23 23:36:03adminsetnosy: + simonmar, - marlowsd