如何使用 CVS diff 将修订版与之前的修订版进行比较?
我目前正在分析一些 CVS 项目。假设我想将 Foo.c(修订版 5)与其之前的修订版(修订版 4)进行比较并输出差异,我可以使用 CVS diff 来实现此目的吗? (不涉及工作副本)
我知道 SVN diff 有一个选项 --change(-c) 可以实现此目的,如下命令:
$ svn diff -c 5 Foo.c
可以自动将 Foo.c 的修订版 5 与其之前的修订版进行比较。
我只是想知道 CVS diff 是否有类似的选项。谢谢!
I am currently analyzing some CVS projects. Suppose I want to compare Foo.c (revision 5) to its previous revision (revision 4) and output the diff, can I use CVS diff to achieve this? (No working copy involved)
I know that SVN diff has an option --change(-c) that can achieve this, a command like:
$ svn diff -c 5 Foo.c
can automatically compare revision 5 of Foo.c to its previous revision.
I just wonder whether CVS diff has similar options. Thanks!
您可以使用:
cvs diff -c -r 5 -r 4 Foo.c
You can use this:
cvs diff -c -r 5 -r 4 Foo.c