$ cp -R libfoo.orig/ libfoo.new/When you finished with modifications to libfoo.new/, generate GNU unified patch:
$ diff -rupN libfoo.orig/ libfoo.new/ > libfoo-05282012.patchTo generate a unified patch against the CVS:
$ cvs diff -u > libfoo-05282012.patchThe patch can be applied to the origianl source tree:
$ cd libfoo/ $ patch -p0 < libfoo-05282012.patchTo revert the patch:
$ patch -p0 -R < libfoo-05282012.patch