Sunday, January 30, 2011

Working with Big Patchsets

In the past, whenever there was a need for me to test or review huge patchsets, I'd generate individual patches by saving the mails containing them. This can get cumbersome, especially if the patchset is huge and if you have to try out multiple versions of the patches. There is however an alternative available. It is to obtain the mbox file pertaining to the entire patchset. The mbox file for kernel patches can be obtained from patchworks. The home page displays a list of projects that are hosted. Below are a few steps to get started -
  1. Create a login on patchworks
  2. Once in your account, select the project of interest from the home page
  3. Using the filters, search for the particular patchset
  4. Select the individual mails of the patchset and create a new 'bundle' from the interface at the bottom of the page. 'bundles' are a group of related
    patches. Name the bundle appropriately
  5. You can go to all your bundles by clicking on the 'bundles' link at the top right corner of any page
  6. The bundles interface allows you to manage your bundles, with support to download it. Bundles are nothing but all the mails in a mbox format
  7. You can then open the mbox with either your mail client or apply it directly to your tree with patch management tools that allow importing mbox files. I use mutt to read the mbox file and stgit to import the patches