My favorites | Sign in
Logo
                
Search
for
Updated Mar 22, 2009 by baron.schwartz
HowToPatchMaatkit  
How and what to patch when making changes to a tool.

Maatkit is a little different than many other utilities. There are special conventions to follow.

When you patch a Maatkit utility, you should investigate where you're patching.

  • Are you changing one of the packages/modules that is embedded in the tool? If so, then you should actually patch the corresponding module in trunk/common/ instead. Add a test case to the corresponding script in trunk/common/t/, and then use the instructions in AssemblingScripts to update the tool itself. After that, add any necessary tests for the tool in its own t/ subdirectory, too.
  • If you're changing code in package main, then a patch to the tool itself is appropriate. Please add a test case to the tool's t/ subdirectory too.

Generally, when changing code in trunk/common, it's a good idea to write a test case for the specific tool you intend to change. We usually iterate back and forth between testing the module, updating the tool, and testing the tool with the newly changed module code. (You can update the tool's copy of the module without committing your changes to the module.) Do this until both the module and the tool are passing their tests. Then you can commit the module, update the module in the tool one last time, and commit the tool and its Changelog. After that, close the associated issue report with a comment mentioning the revisions that fixed the issue.

Hosted by Google Code