darcs

Issue 1590 applying patch to wrong context looks through entire history

Title applying patch to wrong context looks through entire history
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, gh, kowey
Assigned To
Topics Performance

Created on 2009-08-30.12:27:30 by kowey, last changed 2011-06-14.10:55:14 by galbolle.

Files
File name Uploaded Type Edit Remove
issue1590.sh kowey, 2009-08-31.09:32:29 application/octet-stream
Messages
msg8594 (view) Author: kowey Date: 2009-08-30.12:27:26
I don't even know if this can really be considered a bug.

1. darcs get http://wiki.darcs.net (big history)

2. create a patch (darcs send -O)

3. darcs unpull

4. darcs apply the patch

This takes forever.  If you look at the --debug output, it's trying to read
through every patch in my history.

Note that the missing patch in my case was a tag.
See http://lists.osuosl.org/pipermail/darcs-users/2009-August/021091.html
msg8595 (view) Author: kowey Date: 2009-08-30.12:31:13
On Sun, Aug 30, 2009 at 12:27:30 +0000, Eric Kow wrote:
> 3. darcs unpull

darcs unpull the patch *and* things it depends on
msg8617 (view) Author: kowey Date: 2009-08-31.09:32:29
The attached script illustrates the problem (it may need some refining for clarity).

This happens in cases where somebody tries to apply a patch without having
pulled from the repo sent from.  The fact that the missing patch is a tag is
important, I think because that's where the bundle gets cut off -- we don't have
a frame of reference that we can use to stop searching through the history.

OK, at first I thought there wasn't much of a solution and that we maybe needed
issue1505 (hashed context files) to fix this, but now I think there may be an
answer: how about doing the equivalent of a darcs show tags first?
Attachments
msg11466 (view) Author: gh Date: 2010-06-17.06:24:08
I confirm this still exists in darcs HEAD (as of June 17th 2010).
I used the command "darcs obliterate -O" to go back earlier in my
history but to be still able to re-apply my latest patch. When doing
"darcs apply", I have the message:
"Merging us 60 done, 288 queued"

I think "darcs obliterate -O" is almost useless while this bug exists.
msg11467 (view) Author: gh Date: 2010-06-17.06:34:23
My problem happens with only obliterating one patch. So I don't see why
this should give a wrong context in the patch bundle.
msg14524 (view) Author: galbolle Date: 2011-06-14.10:55:14
This seems to be fixed now.
History
Date User Action Args
2009-08-30 12:27:30koweycreate
2009-08-30 12:31:15koweysetnosy: kowey, darcs-devel, dmitry.kurochkin
messages: + msg8595
2009-08-31 09:32:32koweysetpriority: bug
status: unknown -> needs-implementation
messages: + msg8617
files: + issue1590.sh
nosy: kowey, darcs-devel, dmitry.kurochkin
2010-06-17 06:24:09ghsetnosy: + gh
messages: + msg11466
2010-06-17 06:34:24ghsetmessages: + msg11467
2011-06-14 10:55:14galbollesetstatus: needs-implementation -> resolved
messages: + msg14524