[darcs-devel] [issue2383] Using last regrets/hunk edit can lead to "Error applying" error

Owen Stephens bugs at darcs.net
Tue Apr 29 16:09:47 UTC 2014


New submission from Owen Stephens <darcs at owenstephens.co.uk>:

1. Summarise the issue (what were doing, what went wrong?)

I was recording some changes, before noticing at last regrets that I
don't want to include a particular sub-hunk that I've already said yes to.

I have already recorded a file containing:

    -- a comment

    data D = C Int
           deriving (Eq, Show)

which I then change in working to:

    -- another comment

    -- a comment

    data D = C !Int
           deriving (Eq)

Then, in record, I don't record the initial comment-addition, I do
record the final hunk.
I get to last regrets before realising I don't want to remove D's Show
instance,
so I put it back using the hunk editor. I accept the remaining changes,
but darcs fails:

    WARNING: Doing a one-time conversion of pristine format.
    This may take a while. The new format is backwards-compatible.
    Pristine conversion done...

    darcs failed:  ### Error applying:
    hunk ./file 5
    -data D = C Int
    -       deriving (Eq, Show)
    +data D = C !Int
    +       deriving (Eq)
    ### to file ./file:
    -- a comment

    data D = C Int
           deriving (Eq, Show)

darcs shouldn't fail, and should record a patch that simply adds a ! to
the Int parameter of C.

----------
messages: 17409
nosy: owst
status: unknown
title: Using last regrets/hunk edit can lead to "Error applying" error

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2383>
__________________________________


More information about the darcs-devel mailing list