Issue 1749 darcs remove [dir] can make broken patches

Title darcs remove [dir] can make broken patches
Priority critical Status resolved
Milestone 2.4.x Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, ganesh, kowey, reinier.lamers, tux_rocker
Assigned To
Topics Core, Regression

Created on 2010-02-20.00:54:11 by ganesh, last changed 2012-08-09.14:18:05 by kowey.

msg10042 (view) Author: ganesh Date: 2010-02-20.00:54:08
This bug isn't present in darcs 2.1.0 and is present in latest HEAD.
Haven't had time to check inbetween yet.

issue1612 may be related but is reported as being present at least from
darcs 2.0.2 

darcs init
mkdir dir
touch dir/file

darcs add dir/file              # adds dir too (which is fine)
darcs rec -a -m"add dir and file"

darcs remove dir
darcs rec -a -m"remove dir"     # doesn't remove file!

darcs obliterate -a --patch "remove dir"
darcs check
msg10043 (view) Author: ganesh Date: 2010-02-20.01:02:06
Test case pushed.

Also, note that the bug doesn't manifest for old-fashioned repos,
because darcs record tries to remove the directory from pristine and fails.
msg10048 (view) Author: kowey Date: 2010-02-20.23:03:10
It's great that we have this pinned down, not only to a test, but to a
lower bound version.  Looks like we may have some luck tracking this one
down (marking ThePendingPatch topic because this bug may be about
putting silly things in pending, but then again, the fact that this does
not appear in old-fashioned is odd)
msg10049 (view) Author: kowey Date: 2010-02-20.23:04:08
Oh, I didn't read your report carefully enough.  If I had done so, I
would have seen your explanation for why it does not manifest in
old-fashioned repos.
msg10051 (view) Author: ganesh Date: 2010-02-20.23:26:53
I've now verified that this bug isn't present in 2.3.1

Since this is (a) a repo corruption issue and (b) a regression over our
last release, I think it should block the current release. Sorry, Reinier!
msg10052 (view) Author: ganesh Date: 2010-02-20.23:55:28
BTW I've now confirmed that this is present in the 2.4 branch as well as

I plan to track down how this was introduced and fix it as soon as
possible (next few days) but obviously any input from anyone else in the
meantime would be welcome.
msg10138 (view) Author: kowey Date: 2010-03-09.19:46:12
This was resolved by Reinier for the 2.4 release, but I never got around
to fixing my staging repo, so the automatic bug resolver never triggered
msg10187 (view) Author: tux_rocker Date: 2010-03-14.20:16:26
The following patch updated the status of issue1749 to be resolved:

* resolve issue1749: refuse to remove nonempty directories in makeRemovePatch 
Ignore-this: ad57e75a8f336ca97a981e16933a74ea
Date User Action Args
2010-02-20 00:54:11ganeshcreate
2010-02-20 01:02:10ganeshsetpriority: urgent
messages: + msg10043
title: darcs remove makes broken patches -> darcs remove <dir> can make broken patches
2010-02-20 23:03:19koweysetstatus: unknown -> needs-reproduction
topic: + Regression, ThePendingPatch, Hashed
messages: + msg10048
nosy: + kowey
2010-02-20 23:04:14koweysettopic: - Hashed
messages: + msg10049
2010-02-20 23:27:01ganeshsetpriority: urgent -> critical
nosy: + reinier.lamers
topic: + Target-2.4, Core
messages: + msg10051
2010-02-20 23:55:30ganeshsetmessages: + msg10052
2010-02-21 09:19:05koweysettitle: darcs remove <dir> can make broken patches -> darcs remove [dir] can make broken patches
2010-03-09 19:46:14koweysetstatus: needs-reproduction -> resolved
messages: + msg10138
2010-03-14 20:16:29tux_rockersetnosy: + tux_rocker
messages: + msg10187
2010-06-15 21:31:11adminsetmilestone: 2.4.x
2010-06-15 21:31:13adminsettopic: - Target-2.4
2012-08-09 14:18:05koweysettopic: - ThePendingPatch