darcs

Issue 269 adddir and rmdir in the same patch

Title adddir and rmdir in the same patch
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List WFrag, darcs-devel, dmitry.kurochkin, kowey, markstos, thorkilnaur, tommy
Assigned To
Topics

Created on 2006-09-19.17:36:12 by WFrag, last changed 2009-08-27.14:05:10 by admin.

Messages
msg1000 (view) Author: WFrag Date: 2006-09-19.17:36:05
It is possible to make a patch that lists some directory both as added and
removed (there is "adddir" line, then "rmdir" line). Such patches could easely
lead to lock during the patch pulling.

I had two patches: one "broken", that added and removed "A" directory and other
"correct" patch, that added "A" directory. The first patch was applied. I've
looked at the working directory - it did not contained the "A" directory, so
second patch should been applied well. But when I tried to pull it, the darcs
hanged. After some investigation I found that first patch is "broken" and after
fixing it (re-recording it) I pulled second patch successfully.
msg1001 (view) Author: kowey Date: 2006-09-19.17:54:22
On Tue, Sep 19, 2006 at 17:36:12 +0000, Ivan S. Dubrov wrote:
> I had two patches: one "broken", that added and removed "A" directory and other
> "correct" patch, that added "A" directory. The first patch was applied. I've
> looked at the working directory - it did not contained the "A" directory, so
> second patch should been applied well. But when I tried to pull it, the darcs
> hanged. After some investigation I found that first patch is "broken" and after
> fixing it (re-recording it) I pulled second patch successfully.

This is very interesting for us.  We have had a similar problem in
issue264 and we are still looking for a reproducable example.

Could case-sensitivity be related?

Do you think you could help us to reproduce this?
msg1002 (view) Author: WFrag Date: 2006-09-20.03:09:11
Unfortunately, I can't reproduce it neither provide the my repositories. I use
Linux, so the case should not be problem.

I can remember that I've done something like this:

1. I have a repo with upstream version 20060913.
2. I've copied it (with "darcs get") to the branch named 20060918
3. When I removed all files (besides the _darcs) from this directory and
uploaded new upstream sources there.
4. I've recorded the changes.
5. I found that new upstream sources are not "clean", there is directory named
"other" with binary data there.
6. So I deleted the "other" directory and unrecorded the last patch (that
upgrades 20060913->20060918).
7. I've recorded the patch again. This patch becomes "broken", it lists the
"other" directory both as added and as removed.

And now, when I try to pull my patch from 20060913-customized directory, I'm
getting a lock (my "customizing" patch contains a "other" directory with binary
files).
msg2583 (view) Author: markstos Date: 2008-01-19.06:04:09
I'm marking this as "need example".  It is described as being similar to
issue264, which is resolved. 

Also, I couldn't create such a patch with darcs 1.0.9 or 2.0.0pre2 on test repos. 

In any case, work on this is likely stalled until there is a reproducible example. 

   Mark
msg2593 (view) Author: droundy Date: 2008-01-19.12:54:22
I believe I have fixed a bug that led to behavior such as this, so I'll mark
this resolved-in-unstable.
msg2605 (view) Author: markstos Date: 2008-01-19.17:48:12
I tested now to see if I could create such a patch by "adding" the directory in
one patch, and then using "amend-record" to add the remove command. 

This didn't trigger the issue, either, but rather created an empty patch, which
I seems like the appropriate result, even though its an edge case.
History
Date User Action Args
2006-09-19 17:36:12WFragcreate
2006-09-19 17:54:27koweysetstatus: unread -> unknown
nosy: droundy, tommy, kowey, WFrag
messages: + msg1001
2006-09-20 03:09:17WFragsetnosy: droundy, tommy, kowey, WFrag
messages: + msg1002
2008-01-19 06:04:10markstossetstatus: unknown -> waiting-for
nosy: + markstos, beschmi
messages: + msg2583
2008-01-19 12:54:23droundysetstatus: waiting-for -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, markstos, WFrag
messages: + msg2593
2008-01-19 17:48:13markstossetnosy: droundy, tommy, beschmi, kowey, markstos, WFrag
messages: + msg2605
2008-09-04 21:29:18adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:40:03adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, WFrag
2009-08-06 20:51:59adminsetnosy: - beschmi
2009-08-10 21:55:43adminsetnosy: + WFrag, - darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:56:14adminsetnosy: - dagit
2009-08-25 17:53:36adminsetnosy: + darcs-devel, - simon
2009-08-27 14:05:10adminsetnosy: tommy, kowey, markstos, darcs-devel, WFrag, thorkilnaur, dmitry.kurochkin