Open main menu

CDOT Wiki β

Changes

Real World Mozilla Incremental Build Lab

149 bytes added, 19:15, 19 March 2007
no edit summary
=== 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 '''mozilla/''' root directory, so that they can be easily applied later on (i.e., people don't have to figure out where to apply the patch, and can just use their tree's root directory):
$ cd mozilla/netwerk/protocol/http/src
$ cvs diff -u8p . > patch.txt
* Trade patches with someone else in the class (use http://pastebin.mozilla.org and IRC), and take turns trying to apply their patch to your tree:
$ cd mozilla/netwerk/protocol/http/src
$ patch -p0 < patch.txt
* Now try backing-out this same patch. To do this you can call patch with the -R or --reverse option to tell it to swap the old and new files, basically reversing the patch.
$ cd mozilla/netwerk/protocol/http/src
$ patch -R -p0 < patch.txt