[darcs-users] an interface for splitting hunks (was: Re: the readability of darcs native change format)

Tommy Pettersson ptp at lysator.liu.se
Wed Mar 30 10:31:40 UTC 2005

On Wed, Mar 30, 2005 at 01:06:18AM +0000, Mark Stosberg wrote:
> The user could manually insert a special line into the text which means
> "break the hunks here". It could be some token on a line by itself.

I think it sounds interesting.  But I don't think the breaks
should be removed on recording.  I might want to split a
group of lines and wait with recording the second half.
If the breaks stay, I can use amend-record naturally.
This will of course demand that breaks are own lines.

Hmm, but what if I want to record a line that looks like a
break line?  Well, breaks could be treated as hunks too,
just that they don't "lump together" with other lines.
(If they _are_ selected they should maybe be joined in the
resulting patch though.)  It will also make for easy removal
of breaks with revert.  And the break regexp could even
be user-supplied to facilitate the programming language
in question, like '^};?$' for C or '^[^ ]' for Haskell.
Then it would not even have to be a "special" line.

Tommy Pettersson <ptp at lysator.liu.se>

More information about the darcs-users mailing list