[root@dywHome2 ~]# rcsdiff [-kkkkvlr] -kk 比較版本內容的差異(不包括 IDKeyword) -kkvl 指定 IDKeyword 的比較方式,預設比較方式。 -r 指定欲比較版本
[dywang@dywOffice testrcs]$ rcsdiff important.c =================================================================== RCS file: RCS/important.c,v retrieving revision 1.6 diff -r1.6 important.c
[dywang@dywOffice testrcs]$ rcsdiff -r1.3 important.c =================================================================== RCS file: RCS/important.c,v retrieving revision 1.3 diff -r1.3 important.c 1a2 > * $Id: important.c,v 1.6 2008/03/12 01:51:38 dywang Exp dywang $ # 1.3 版的第 1 行後,插入了新的第 2 行。 7a9 > static char const rcsid[] = "$Id: important.c,v 1.6 2008/03/12 01:51:38 dywang Exp dywang $"; # 1.3 版的第 7 行後,插入了新的第 9 行。 13a16,17 > printf("test for comment\n"); > printf("%s\n", rcsid); # 1.3 版的第 7 行後,插入了新的第 16,17 行。
[dywang@dywOffice testrcs]$ rcsdiff -r1.3 -r1.4 important.c =================================================================== RCS file: RCS/important.c,v retrieving revision 1.3 retrieving revision 1.4 diff -r1.3 -r1.4 13a14 > printf("test for comment\n"); # 1.3 版的第 13 行後,插入了新的第 14 行。
[dywang@dywOffice testrcs]$ rcsdiff -r1.5 -r1.6 -kk important.c =================================================================== RCS file: RCS/important.c,v retrieving revision 1.5 retrieving revision 1.6 diff -r1.5 -r1.6 8a9 > static char const rcsid[] = "$Id$"; 15a17 > printf("%s\n", rcsid);
[dywang@dywOffice testrcs]$ rcsdiff -r1.5 -r1.6 -kkvl important.c =================================================================== RCS file: RCS/important.c,v retrieving revision 1.5 retrieving revision 1.6 diff -r1.5 -r1.6 2c2 < * $Id: important.c,v 1.5 2008/03/07 03:30:31 dywang Exp $ --- > * $Id: important.c,v 1.6 2008/03/12 01:51:38 dywang Exp $ 8a9 > static char const rcsid[] = "$Id: important.c,v 1.6 2008/03/12 01:51:38 dywang Exp $"; 15a17 > printf("%s\n", rcsid);
[root@dywHome2 ~]# rcsmerge [-kkkkvlr] -kk 整合檔案版本(不包括 IDKeyword) -kkvl 指定 IDKeyword 的整合方式 -r 整合檔案版本(包括 IDKeyword)
[dywang@dywOffice testrcs]$ co -l -r1.6 important.c RCS/important.c,v --> important.c revision 1.6 (locked) done [dywang@dywOffice testrcs]$ rcsmerge -r1.2 -r1.2.1.1 important.c RCS file: RCS/important.c,v retrieving revision 1.2 retrieving revision 1.2.1.1 Merging differences between 1.2 and 1.2.1.1 into important.c rcsmerge: warning: conflicts during merge
[dywang@dywOffice testrcs]$ co -l -r1.6 -j1.2:1.2.1.1 important.c RCS/important.c,v --> important.c revision 1.6 (locked) revision 1.2 revision 1.2.1.1 merging... merge: warning: conflicts during merge done
[dywang@dywOffice testrcs]$ co -l -r1.6 -j1.2:1.2.1.1,1.3:1.4 important.c RCS/important.c,v --> important.c revision 1.6 (locked) revision 1.2 revision 1.2.1.1 merging... merge: warning: conflicts during merge revision 1.3 revision 1.4 merging... merge: warning: conflicts during merge done