CVS笔记

题记:前段时间用perl写了一个程序,操作中一不小心全部删除了。苦哉!好长时间都没有回过神来。今天回过头来好好使用一个版本控制器。毕竟这是开发根本之所需。

 

一 quick start

1 installing

下载源文件

 tar zxvf  cvs.tgz

 cd cvs

 ./configure -prefix=/install_dir

 make;make instal

 

 2 building repository

 mkdir /somepath/cvsroot

 chgrp cvs-grp /somepath/cvsroot

 chmod 2775 /somepat/cvsroot

 cvs -d /var/lib/cvsroot init

创建仓库文件主目录,更改属组为cvs-grp(待补充说明),设置2775权限,sgid设置的原因是保证/somepath/cvsroot中创建的文件保持与父目录一样的group-id,

 

 

 3 importing projects

Once you have your initial project structure, add any initial files you want. Change into the root directory of the project. Then, from within that directory, import the project with the command:

 cvs -d repository_path import name_of_project vendor_tag release_tag

 

 4 checking out files

 cvs -d repository_path checkout project_name

 

 5 commiting changes and updating sandbox

  cvs commit
  cvs update -d

As the update command runs, it generates a list of files that are modified. To the immediate left of each filename is a single uppercase letter. Those letters report the status of each file listed, and they have the following meanings:


A filename

Marked for addition but not yet added to the repository (need to run a cvs commit).


C filename

There was a conflict between the repository copy and your copy. The conflict requires human intervention.


M filename

Modified in your working directory. The file in the sandbox is more recent than the repository version, or the sandbox and the repository both had changes that the system could safely merge into your sandbox copy (need to run a cvs commit).


P filename

Patched in the sandbox; similar to U (updated successfully), but in this case CVS sent only the changes, not the entire file.


R filename

Marked for removal but not yet removed from the repository (need to run a cvs commit).


U filename

Updated successfully. A newer version in the repository has replaced your sandbox version.


? filename

The file is in your working directory but not in the repository. CVS doesn't know what to do with it. It's common to see this marker next to temporary or intermediate files that you haven't cleaned up.

The A, R, and M codes mean that your sandbox contains changes that are not in the repository and it would be a good idea to run a cvs commit.

 

 

 6 adding files and remove files

  touch file3

  cvs add file3

  cvs commit

 
  rm file3
  cvs remove file3
  cvs commit

 

 

二 建立pserver 让远程client访问

在CVSROOT目录下建立passwd writers readers

 

create /etc/xinetd.d/cvspserver

service cvspserver
{
    port = 2401
    socket_type = stream
    protocol = tcp
    wait = no
    user = root
    passenv = PATH
    server = /usr/bin/cvs
    server_args = -f --allow-root=/var/lib/cvs pserver
}

/etc/init.d/xinetd restart

cvs -d :pserver:jenn@cvs_server:/var/lib/cvs login

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值