New submission from Edwin <[EMAIL PROTECTED]>:

With the most recent darcs unstable, the following gives an invalid pending:
C:\>mkdir test
C:\>cd test
C:\test>darcs init
C:\test>cat >foo
1
2
3
C:\test>darcs add foo
C:\test>darcs revert -a
darcs: bug in darcs!
There was an attempt to write an invalid pending!
If possible, please send the contents of _darcs/patches/pending_buggy
along with a bug report.
Please report this to [EMAIL PROTECTED]
If possible include the output of 'darcs --exact-version'.

The contents of pending_buggy look like:
{
addfile ./foo
hunk ./foo 1
-1
-2
-3
rmfile ./foo
}

As far as I can tell, sift_for_pending isn't doing its job properly - because
the addfile doesn't include the hunk of contents, it can't cancel against the
removal hunk, so we're left with something that can't be applied.  It might be
possible to fix this by allowing coalesceFilePatch (in PatchCommute) coalesce an
AddFile and a Hunk to produce an AddFile, in the case where it's all being done
in pending, but I don't know whether that idea is basically stupid, or how to
cleanly pass the required state through.

Any thoughts?

Edwin

----------
messages: 1326
nosy: EricKow, droundy, edwint, tommy
priority: bug
status: unread
title: Another invalid pending

____________________________________
Darcs issue tracker <[EMAIL PROTECTED]>
<http://bugs.darcs.net/issue365>
____________________________________

_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to