Open main menu

CDOT Wiki β

Changes

Working with Patches Lab

99 bytes removed, 11:49, 9 February 2010
Create a patch
* Now create a patch containing the changes you just made using the so called '''unified''' format (-u), with 8 lines of context. By default the diff is printed to stdout, so you should redirect it to a file. Typically patches are created from the top of your source directory (e.g., '''src/''') so that they can be easily applied later (i.e., people don't have to figure out where to apply the patch, and can just use their tree's root directory):
 
$ cd src
$ cvs diff -u8p . > patch.txt
 
If you are using hg instead of cvs, you do it this way:
$ cd src