> I think a safe thing to do would be work on a tool that only lets
> you split hunks (and not edit them).  Putting in type witnesses to
> clarify what I mean, your patch converter function could be something
> like
>
>  p C(x y) -> FL p C(x y)
>
> I'm not sure if I've got the types exactly right here, but hopefully
> this gives you some ideas.
>
> Do these two thoughts give you any extra traction?  Maybe other people
> on this list would have some ideas to help out...

My idea (which i never got around to implement) was that given these
difficulties, a first step would be to give up on-line
splitting/editting of hunks, and offer off-line editing. For this, we
would need record to optionally dump the patch it would record instead
of recording it, and have an option to read it back (non-interactively).

So instead of

darcs record
-do you want to record this hunk ?
-i'd rather split it
-where do you want to split it
-there
[-other patches]
-kthx
end of darcs record

you would have

darcs record
-do you want to record this hunk ?
-yes please
[-other patches]
-record, abort or dump?
-dump please
end of darcs record, nothing recorded
emacs to-be-recorded.patch
darcs record --read to-be-recorded.patch
done

Maybe it's the lazy solution. It's not very darcs-ish in terms of UI,
but it might also be useful for transplant (take a patch from another
repository, and import it via record). It could also be useful without
hunk-splitting, whenever you want to have a global vision of what hunks
you record before recording them, and do the choosing in a full fledged
editor interface (for example if you want to record hunks matching a
given pattern, or that kind of things).

For what it's worth,

Florent

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to