Presentation is loading. Please wait.

Presentation is loading. Please wait.

CVS Concurrent Versions System LI-WEN CHEN 2012-07-24 1.

Similar presentations


Presentation on theme: "CVS Concurrent Versions System LI-WEN CHEN 2012-07-24 1."— Presentation transcript:

1 CVS Concurrent Versions System LI-WEN CHEN 2012-07-24 1

2 WHAT IS CVS  Concurrent Versions System a version control system  stores the differences between versions  can easily retrieve old versions to see exactly which change caused the bug 2

3 SETUP  install yum install xinetd yum install cvs  create a CVS group groupadd cvs useradd –g cvs –s /sbin/nologin cvsroot chmod 775 /home/cvsroot  create a group user useradd username -g cvs passwd username 3

4 SETUP  create a repository in your directory cvs -d /home/cvsroot init then the directory CVSROOT will also be created  enable CVS service vi /etc/xinetd.d/cvs /etc/init.d/xinetd restart 4 disable = no server_args = -f --allow-root /home/cvsroot pserver # bind = 127.0.0.1

5 CHECK SETUP  # chown -R cvsroot:cvs /home/cvsroot  iptables open 2401 port  # netstat -lnp|grep 2401 tcp 0 0 :::2401 :::* LISTEN 3470/xinetd  # vi /etc/services cvspserver 2401/tcp #CVS PServer 5

6 ACCESS A CVS SERVER  telling CVS where your repository is cvs –d :pserver:[username@hostname:]/home/cvsroot command or export CVSROOT=:pserver:[username@hostname:]/home/cvsroot cvs command [filename] 6

7 COMMAND  login cvs login  logout cvs logout 7

8 COMMAND  import a lot of files which is already exist cvs import repository vendor_tag release_tag  check out cvs checkout / co ex: cd wdir cvs import -m "Imported sources" yoyodyne/rdir yoyo start cd.. cvs checkout yoyodyne/rdir 8

9 COMMAND  status cvs status / st Up-to-date Locally Modified Needs Patch Needs Merge  update cvs update / up cvs up -d Create any directories that exist in the repository if they're missing from the working directory 9

10 COMMAND  defference cvs diff / dif ex: cvs diff -c yourWorkingFile produce a context diff between two releases  check in (commit) cvs commit / ci ex: cvs ci -m “add the comment" index.php  log cvs log / lo 10

11 ADD  新增檔案 1.local 下編輯產生新的檔案 2.cvs add 檔案名稱 3.cvs ci -m " 記錄訊息 " 檔案名稱  新增目錄 1.local 下產生新的目錄: mkdir 目錄名稱 2. 將新目錄存入檔案庫: cvs add 目錄名稱 11

12 REMOVE  刪除檔案 1.local 中刪除該檔案: rm 檔案名稱 2.cvs remove 檔案名稱 3.cvs ci -m " 記錄訊息 " 檔案名稱  刪除目錄 1.local 中刪除該目錄中所有的檔案: cd 目錄 & rm 檔案名稱 2. 將刪除的檔案加入工作排程: cvs remove 檔案名稱 3. 將刪除的檔案動作存入檔案庫中,以移除庫存: cvs ci -m " 記錄訊息 " 檔案名稱  更新: update -P 12

13 CHANGE FILENAME 1.local 下將舊檔名改成新檔名 2.cvs remove 舊檔名 3.cvs add 新檔名 4. 存入檔案庫中: cvs ci -m " 記錄訊息 " 舊 檔名 新檔名 13

14 REFERENCE  HOW-TO Install and Configure a CVS Repository Server HOW-TO Install and Configure a CVS Repository Server  用 Open Source 工具開發軟體 : 新軟體開 發關念 Chapter 3. 用 Open Source 工具開發軟體 : 新軟體開 發關念 Chapter 3.  CVS manual CVS manual Index search Guide to CVS commands 14


Download ppt "CVS Concurrent Versions System LI-WEN CHEN 2012-07-24 1."

Similar presentations


Ads by Google