QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1011|回复: 1

本地CVS commit问题求助!!!

[复制链接]
发表于 2006-4-22 00:28:48 | 显示全部楼层 |阅读模式
结果如下(好像进入了vi):
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: hello.c
CVS: ----------------------------------------------------------------------

~
~
"/tmp/cvskNEyR1" 9L, 292C

^z强行退出后显示:
[cvsroot@localhost mycvs]$ cvs commit
cvs commit: Examining .

[1]+ Stopped cvs commit

而Beginning Linux®Programming书上的结果为:
cvs commit: Examining .
Checking in hello.c;
/usr/local/cvsroot/mycvs/hello.c,v <-- hello.c
new revision: 1.2; previous revision: 1.1
done

我的过程如下:
//create a new group , a home directory and a new user for CVS
#groupadd gcvs
#mkdir /usr/local/cvsroot
#useradd -g gcvs -d /usr/local/cvsroot cvsroot
#chmod 2775 /usr/local/cvsroot
#chown cvsroot:gcvs /usr/local/cvsroot

//add these two lines below:
CVSROOT=/usr/local/cvsroot
export CVSROOT
//into /etc/profile,
//then use command
#env
//or
#echo $CVSROOT
//to check this change.


#su cvsroot
$cvs -d /usr/local/cvsroot init
//this command will create a folder "CVSROOT" in /usr/local/cvsroot.

//goto the source directory(module)(eg. "/helloworld",has hello.c and makefile) that needed to be
//controlled:
$cd /helloword
$cvs import -m"Intial project" hellowordcvs berge start
//before that,root must set the right of all the files in /helloword //to 2775
#chmod 2775 *

//and a directory "helloworldcvs" will be created in /usr/local/cvsroot.

//Now is a good time to check that we can retrieve our files from CVS.
//goto any directory where you want to put cource files retrieved
$cvs checkout helloworldcvs
//here "helloworldcvs" is a directory name that has been checked in before.

//then make any chang to the source file "hello.c" in the retrieved directory, type
$cvs diff
//int the retrieved directory to observe this change.
//这里能正确看到源文件修改后的差别

$cvs commit
发表于 2006-4-22 21:06:22 | 显示全部楼层
写点changelog进去啊,然后:wq保存退出
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 18:38 , Processed in 0.039062 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表