On Thu, 7 Sep 2006 at 11:55am, Lev Lvovsky wrote:

> I'm using a version control app called darcs, which allows me to view
> a diff hunk by hunk, to pick and choose the changes that I want to
> apply.  darcs aside, is there an in-depth howto for editing patches
> and such?  Specifically, I'm looking for a way to split single hunks
> into two hunks, write the diff, and then feed it into darcs.
>
> My co-worker uses emacs, which seems to come with a pretty complete
> patch editing command set - it's likely my inexperience that's
> causing me to not find much of that same functionality in vim, so any
> pointers would be appreciated...
>
> thanks,
> -lev

It is not clear from your email what you mean by splitting hunks, may be
giving some examples will help. Vim has the :diffpatch command though I
never used it. If I have diff, I often just execute the external patch
command as:

:!patch -i - %

and then copy paste the diff in to the window. If you can get the vimdiff
to open up with two versions, you can easily use the :diffget and
:diffput commands to selectively move the hunks that you are interested.
I have no idea on how darcs works and if there is a Vim plugin to
integrate it, but I maintain a plugin for perforce and have commands to
open vimdiff on multiple versions (including the local ones) and use it
to patch (or revert) only selective hunks all the time.

-- 
HTH,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to