Thursday, September 18, 2008


As I use cvs for code control, I found patch is a good tool that helps to build the actual release. To do actual release, some times I need to make changes on the code such as change the macro of "#define ENABLE_FOO 0" or some thing else, and these change may not be good to commit to cvs, and I also don't want to create branch with cvs, as each branch can be orphan if I forget to update. So the basic way is:

1. cvs tag
2. modify some code and build the release.
3. make patch (I use tortoriseCVS)

When you want to apply the patches, first make sure you can the patch is for what 'tag' version. after that
1. cvs co -r "tag" "module name"
2. go to the directory you just check out the source code.
3. patch -p0 < "your patch file"