[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectMerging several patches - Tips and Tricks

Recently I was asked how I was able to merge a few moderately large patches

Here's basically what I told him:
Here's what I did instead of manually fixing the reject...

You need three kernel trees for this...

2.4.13-ac5 (or whatever -ac)

ln -s /usr/src/lk2.4/2.4.13-freeswan /usr/src/linux (for freeswan patching
cd /usr/src/freeswan-1.91
make insert (no problems with 2.4.13)
cd /usr/src/lk2.4/2.4.13freeswan-1.91
patch 2.4.13-ac5 (two rejects)
cd /usr/src/lk2.4

diff -U1 2.4.13.vanilla/Documentation/ \
2.4.13-ac5/Documentation/ >

mv 2.4.13-freeswan/Documentation/ \

cd 2.4.13-freeswan
patch -p1 < ../

(no rejects!)

Rinse and repeat...

Ok, here's the idea. Normally, diff uses 3 lines of context, this can cause
it to create larger chunks within the patch, and patch won't split these
hunks up to try to get it to apply. So, if you have smaller chunks and more
of them, it has a much better chance of being able to integrate it...

This proceedure is working for me, but I am rather new to the whole process.
Is there another way that doesn't require so many trees, and disk space?

I'd like people to post their tips and tricks, so maybe we can point to it
when the topic comes up again. Or, maybe a web site would be better...

Note, none of this will help if the actual code will patch together, but
won't work afterwards...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:12    [W:0.026 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site