[darcs-users] [patch123] Name the separators in the hunk splittin... (and 1 more)

Antoine Latter aslatter at gmail.com
Thu Jan 21 03:39:18 UTC 2010


On Mon, Dec 28, 2009 at 7:49 PM, Eric Kow <bugs at darcs.net> wrote:
>
> New submission from Eric Kow <kowey at darcs.net>:
>
> Here is an attempt at friendlier online help for the interactive hunk editing.
>
> The idea is to just give instructions for the most common use (hunk splitting)
> and then hint to the user that the system generalises beyond that by saying
> that they can make any edits they want.  The manual would need to follow up
> by saying something to the effect that if you make modifications, Darcs will
> automatically compute 'filler' patches before and/or after the current patch;
> and that you may record or revert these filler patches at will.
>
> I tried saying that in the online help, but it took up two or three lines.
>
> Tue Dec 29 01:26:13 GMT 2009  Eric Kow <kowey at darcs.net>
>  * Name the separators in the hunk splitting interface.
>
> Tue Dec 29 01:45:06 GMT 2009  Eric Kow <kowey at darcs.net>
>  * Improve online help for hunk-splitting.
>

One issue I had with trying to use the patch-editor was that I thought
I was supposed to modify the upper and lower pain into the diff I
wanted to record.

I was presented with this:

nteractive hunk edit:
 - Edit the first set of lines to insert a new change before the current one.
 - Edit the second set of lines to insert a new change after the current one.
===
my second line
my third line
===
my second line EDITED
my third line EDITED
===

And since I only wanted to record my first edit, I changed it to the following:

===
my second line
===
my second line EDITED
===

thinking "this is the diff I want to record".

Which results in the following:

>>>>>
hunk ./test.txt 2
-my second line
-my third line
+my second line EDITED
+my third line EDITED
Shall I record this change? (1/1)  [ynWesfvplxdaqjk], or ? for help: e
hunk ./test.txt 3
-my third line
Shall I record this change? (1/3)  [ynWesfvplxdaqjk], or ? for help:
<<<<

Of course, I don't want to delete the third line at all! So I answer 'n'.

darcs then replies with:

>>>>
Skipped record of 2 patches.
Ok, if you don't want to record anything, that's fine!
<<<<

I've learned now that if I want to split a record, I need to leave the
top pain alone. But it was a bewildering lesson to learn.

Antoine


More information about the darcs-users mailing list