QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3468|回复: 0

求救!!本地CVS,commit之后没有正确结果!

[复制链接]
发表于 2006-4-22 00:21:12 | 显示全部楼层 |阅读模式
结果如下(好像进入了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/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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-22 07:53 , Processed in 0.040074 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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