Thursday, February 25, 2010

patching the code using cvs

I have blogged this and this,

But I would use the following command to create a patch and apply the patch.





$ cd /devel/foo
$ cvs diff -uNa > patch.txt
...
$ cvs co -r z_markc_-22jan2010 foo
$ cd foo
$ patch -p0 < /path/to/your/patch.txt


In creating a patch, "-a" is used for added code if needed.