cool stuff - quilt for patch management
Posted on February 26, 2008
Filed Under programming |
while working with openmoko i recently became aware of quilt, an excellent patch management system. i haven’t worked with patch files too often, preferring to use a revision control system like subversion, but the few times i have dealt with generating and managing patches i wished there were a better way. suddenly with quilt such mundane tasks as generating a patch file for a srpm in a redhat-based system or keeping a set of uncommitted local changes to an anonymous subversion checkout become trivial.
quilt lets you create new patch files by working directly from a single source tree instead of requiring that you keep a copy of an unmodified source tree from which you generate a diff. additionally it tracks as many distinct patches to the source tree as you need, each of which can be applied or unapplied selectively.
quilt models patches as a stack - patch A is applied first then patch B then patch C:
C
B
A
one annoyance is that the patches must have an order and quilt insists that patches are applied in order. this is great for patches which edit related bits of code and are truly dependent but not so great for patches that are relatively independent - if patches A, B, and C modify different sections of the code and could be applied or unapplied in any order and you just want patches B and C applied. in this scenario if you applied patch B and C, patch A is automatically applied before patch B and B is applied before C. you can manually edit the series file to change the order - not the greatest solution but workable.
there are several resources available which do a much better job of explaining what quilt is and how to use it. i definitely recommend checking them out:
Comments
Leave a Reply




