Wednesday, October 21, 2009

CVS DIFF

When you need to find differences between two versions of any file in CVS, pass the current and previous version numbers of the file along with file name to CVS diff.

Example below

cvs diff -r 1.4 -r 1.5 filename.sh
Index: filename.sh
===================================================================
RCS file: /cvs/ruchi/bin/filename.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -r1.4 -r1.5
216c216
< values="2 6 7"
---
> values="1 2 3 4 5 11 15"
-----------------------------------

Note
> indicates : Modified/ added line in new version
< indicates : Code in previous version