RCS版本控制

来源:互联网 发布:java根据ip获取城市 编辑:程序博客网 时间:2024/06/07 23:37

RCS(Revision Control System)衍生品有两个
SCCS(Source Code Control System)
CVS(Concurrent Versions System)是一种GNU软件包,主要用于在多人开发环境下的源码的维护
现在大多数软件开发公司都使用SVN替代了CVS

1. ci check in

# ci char.cchar.c,v  <--  char.cnew revision: 1.2; previous revision: 1.1enter log message, terminated with single '.' or end of file:>> include //备注信息>> .done

2. co check out

# co char.c //只读cochar.c,v  -->  char.crevision 1.2done
# co -l char.c //加锁cochar.c,v  -->  char.crevision 1.3 (locked)done

只有一个用户有写权限

# co -l char.c //co失败char.c,v  -->  char.cco: char.c,v: Revision 1.3 is already locked by root.

3. rlog
查看文件的改动清单

# rlog char.cRCS file: char.c,vWorking file: char.chead: 1.3branch:locks: strictaccess list:symbolic names:keyword substitution: kvtotal revisions: 3; selected revisions: 3description:hello

4. rcsdiff
查看两个修订版之间的改动

# rcsdiff -r1.1 -r1.2 char.c===========================================================RCS file: char.c,vretrieving revision 1.1retrieving revision 1.2diff -r1.1 -r1.21a2> #include <stdio.h> //改动
1 0