Concurrent Versions System CVS chedongbigfoot com CVS Concurrent
Concurrent Versions System (CVS) 版本控制系统简介 车东 chedong@bigfoot. com
什么是 CVS Concurrent Version System 并发版本控制系统 ¬ Unix端服务器 http: //www. cvshome. org ¬ 其他平台的客户端 http: //www. wincvs. org/ ¬ FAQ http: //www. loria. fr/~molli/cvs-index. html
术语 ¬CVSROOT: 代码库 ¬Repository: 项目包 ¬Version: 版本号 ¬Branch: 版本分支
CVS开始第一个项目 ¬环境变量$CVSROOT: – bash: CVSROOT=/home/cvsroot ; export CVSROOT – tcsh: setenv CVSROOT /home/cvsroot ¬CVSROOT库初始化:cvs init ¬项目包首次导入:cvs import – cvs import -m "write some comments here" project_name vender_tag release_tag
CVS的使用命令 ¬ cvs checkout proj_name 导出项目包 ¬ cvs commit –m “write comments” file_name 提交更新 ¬ cvs update –m “write comments” file_name 同步库 ¬ cvs log file_name查看修改日志 ¬ cvs diff –r 1. 2 –r 1. 3 file_name 查看文件版本区别 ¬ cvs add file_name 添加新文件到项目包 ¬ cvs remove file_name 从项目包里删除文件
CVS的远程用户认证 ¬通过SSH远程登陆CVS: ¬ CVSROOT=: ext: $USER@test. server. address#port: /path/to/cvsroot CVS_RSH=ssh; export CVSROOT CVS_RSH ¬CVS服务器端SSH端口不在缺省的22 假设服务器端的ssh端口是 34567,客户端,创建ssh_cvs #!/usr/bin/sh ssh -p 34567 $* 然后:chmod +x ssh_cvs 设置CVS_RSH=ssh_cvs; export CVS_RSH
CVS Web界面访问 方便文件版本跟踪 – – http: //www. freebsd. org/~fenner/cvsweb/ 一个功能更丰富的版本 http: //www. spaghetti-code. de/software/linux/cvsweb/
CVS vs VSS ¬ CVS update/commit ¬ CVS没有锁定机制 edit/unedit ¬ VSS get_lastest_version /check_in ¬ checkout/undo checkout 通用的标记 $Header$ $Author$ $Date$ $Revision$
Win. CVS http: //www. wincvs. org/ 1. Cvs Folders->Macros folder->Change Root 2. Cvs Admin->Preferences cvs server: username@server. ip. address: /path/to/cvsroot Authenitication: passwd at cvs server 3. Cvs Admin->Login… 4. Cvs Admin->Checkout module…
CVSTrac WEB界面的 ¬CVS用户管理 ¬CVS WEB浏览 ¬BUG TRACKING ¬Wiki讨论版
相关资源 ¬ CVS HOME: http: //www. cvshome. org ¬ CVS FAQ: http: //www. loria. fr/~molli/cvs-index. html ¬ ¬ 相关网站: http: //directory. google. com/Top/Computers/Software/Configuration_Management/Too ls/Concurrent_Versions_System/ CVS 免费书: http: //cvsbook. red-bean. com/ CVS 命令的速查卡片: http: //www. refcards. com/about/cvs. html Win. CVS: http: //www. wincvs. org CVSTrac: A Web-Based Bug And Patch-Set Tracking System For CVS http: //www. cvstrac. org
- Slides: 15