On Wednesday, 29 October 2008 18:22:29 Tim Bird wrote: > Randy Dunlap wrote: > > Hi, > > > > Is there a good (or typical) way to split a patch into 2 patches > > (in a series)? > > > > Given series: > > fix1.patch # patches file: test1.c > > > > I want parts of fix1.patch in a new patch (fix2.patch). > > test1.c is the only source file in these patches. > > > > I'll need to edit parts of fix1 and fix2 concurrently... > > Well, that seems to be the easiest way to do this, but maybe > > that's not allowed. > > > > How should I go about this? > > I'm not sure what the best way to do this is, but I > use: > * "quilt fork" - make a duplicate of the patch in the series file > * "quilt pop" - pop the new patch off the series file > * edit patches/series to include both patches > * edit patches/fix1.patch to remove parts that I only want in fix2 > * edit patches/fix2.patch to remove parts that I only want in fix1 > If the patch chunks for the different parts don't overlap, then > this is relatively easy. You can just remove whole chunks > from each patch. Otherwise, just do the best you can, and > when pushing, resolve conflicts in the fix2.patch > * "quilt push" - to push fix1 > * "quilt push" - to push fix2 > If there are conflicts remaining between stuff in fix1 and fix2, > resolve them and refresh.
I sometimes use a variant of this that may be more "fool proof" (I need^Wprefer that): I start an new patch *before* the patch I want to split, pull all the changes I want to split from the second patch into the first one, and then I prepend a "quilt diff -R" to the following patch. Then I push, and "quilt diff" shows me the remainder. Once satisfied, I do a "quilt refresh". I'm sure this could be automated and improved further, but splitting patches never annoyed me enough to actually work on this. Andreas _______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
