lindenbaum 发表于 2006-4-22 00:21:12

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

结果如下(好像进入了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强行退出后显示:
$ cvs commit
cvs commit: Examining .

+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
页: [1]
查看完整版本: 求救!!本地CVS,commit之后没有正确结果!