Splitting a patch in two (ideal in Vim)

I have a patch that I would like to split into two parts. I need to split the patch with the granularity of each line - I can't just split the chunks into two separate files.

I could use Emacs diff mode, but I'm a Vim user and I don't want to learn Emacs. I manage this patch in Mercurial Queues and I use the crecord plugin, but it is rather cumbersome for large patches and the UI is very slow.

Ideally, I would like to use Vim to edit my patch, but I could not find a suitable plugin. Otherwise I would benefit from something other than Emacs that is better than crecord. Is there such a thing?

+2


source to share


3 answers


There seem to be two plausible answers:

  • Is there some reason vimdiff is not good enough? You can edit a copy of the original and a revised copy, transfer the desired changes to the original, save it, compare with the original to create the first patch, and separate the fully revised version from it to create a second patch. - Jefromi 2009-08-25 20:49.

  • I've been using VCSVimdiff with Mercurial for a long time, it works really well. - tonfa 2009-12-24 13:55



If someone confirms this, they will move the question from the unanswered list; this is a Community Wiki so it is not profitable for me.

+1


source


If you add the Mercurial tag to this question some Mercurial experts around ...



0


source


The perfect tool for manual patching for me - git add -i

.

You can also try filterdiff

, but it depends on whether it allows the manipulations you want to do.

-1


source







All Articles