[PATCH 0 of 3] RFC: Splitting patch hunks with the record extension
Dirkjan Ochtman
dirkjan at ochtman.nl
Tue Jan 5 09:09:01 UTC 2010
On Tue, Jan 5, 2010 at 01:44, Steve Losh <steve at stevelosh.com> wrote:
> With the current record extension you can't do this because the two lines are adjacent and so are part of a single hunk. These patches attempt to address that situation in an easy-to-use fashion.
Awesome, thanks for working on this!
> A screenshot will probably make this clearer: http://twitpic.com/wp8vs
This usage got me a little confused, if only for the fact that the
example is a little confusing (e.g. you're changing the whitespace in
two lines, but the intermediate state is that you just remove the
lines?!?).
That said, first thoughts on what the UI should be, based on what I'm
seeing here:
- have you looked at darcs, where they have this already, IIRC?
- if using the line numbers (which may be non-obvious), why not make
the line numbers be the lines that get applied? E.g. in your example
if you say 0 2, it would fix the whitespace in the [usage] line but
not the [keywords] line. Less indirection, and should make it fairly
efficient to specify things, though may get unwieldy for large changes
(ranges could help, e.g. 1-4 will apply lines numbered 1 to 4
inclusive).
- don't use line numbers but prompt for every line (also very unwieldy
for large patches, I guess)
Cheers,
Dirkjan
More information about the Mercurial-devel
mailing list