hi there,
i thinks this is a bug. hope i haven't missed it when checking for it
in the bug tracker. i think it's low priority (see work-around
below).
i would love to fix it myself, too, but i'm in a little bit of a rush.
soo... enjoy! :-)
cheers,
matthias
to reproduce:
$ mkdir test
$ cd test
$ darcs init
$ echo -ne "eins\nzwei\ndrei\n" > wef.txt
$ darcs record -am wef
$ echo -ne "eins'\n" > wef.txt
there are two conceivably independent changes now: eins changed to
eins'; and zwei, drei went away.
$ darcs whatsnew
hunk ./test 1
-eins
-zwei
-drei
+eins'
i just want to record the latter.
$ darcs record
(type e)
(save this:)
| Interactive hunk edit:
| - Edit the section marked 'AFTER'
| - Arbitrary editing is supported
| - This will only affect the patch, not your working copy
| - Hints:
| - To split added text, delete the part you want to postpone
| - To split removed text, copy back the part you want to retain
|
| ========================== BEFORE (reference) ==========================
| zwei
| drei
| ============================= AFTER (edit) =============================
| ============================= (edit above) =============================
then the command line sais this:
| Shall I record this change? (1/1) [ynW...], or ? for more options: e
| hunk ./test 1
| -eins
this is where i disagree with darcs. (-:
however, if i save this:
| Interactive hunk edit:
| - Edit the section marked 'AFTER'
| - Arbitrary editing is supported
| - This will only affect the patch, not your working copy
| - Hints:
| - To split added text, delete the part you want to postpone
| - To split removed text, copy back the part you want to retain
|
| ========================== BEFORE (reference) ==========================
| eins
| zwei
| drei
| ============================= AFTER (edit) =============================
| eins
| ============================= (edit above) =============================
the command line sais this:
Shall I record this change? (1/1) [ynW...], or ? for more options: e
hunk ./test 2
-zwei
-drei
(then if i go to edit the patch again, it's the one that breaks after
edit.)
yeay, i found a bug! (-:
workaround: instead of removing the lines that have changed from the
"before" and the "after", leave them in the "before", and replace the
"before" in the "after" (as shown above).
|