Thursday, February 24, 2011

What heck is the diff command I need to run for patch?

Here is an excellent article on this issue:

http://stephenjungels.com/jungels.net/articles/diff-patch-ten-minutes.html

Here is what I need to do ...


$ cvs diff -u -r1.27 -r1.26 my_file.conf > patch_back_to_r1.26
$ patch < patch_back_to_1.26
patching file my_file.conf

2 comments:

  1. This is also a handy way of moving back to an earlier revision of a cvs controlled file without all the stupid "sticky tag" bull-crap

    ReplyDelete
  2. used this trick today to backout a crappy version of a file

    ReplyDelete