CVS ÊÇ Concurrent Version System£¨²¢Ðа汾ϵͳ£©µÄËõд£¬ÓÃÓÚ°æ±¾¹ÜÀí¡£Èç¹û´ó¼ÒÔø¾²ÎÓë¹ý¶àÈËÐ×÷¿ª·¢µÄÏîÄ¿£¬´ó¼Ò¿Ï¶¨ÓÐÕâÑùµÄÍ´¿à¾Àú£ºÓÉÓÚ¶à¸öÈËͬʱÐÞ¸Äͬһ¸öÎļþ£¬×Ô¼ºÐÁÐÁ¿à¿àÐ޸ĵijÌÐò±»±ðÈ˳¹µ×ɾ³ýÁË¡£ÁíÍ⣬Èç¹ûÄãµÄÈí¼þ/³ÌÐòÒѾ·¢²¼ÁËÈý¸ö°æ±¾£¬¶øÕâʱºòÓû§ÐèÒªÄãÐ޸ĵڶþ¸ö°æ±¾µÄ¶«Î÷£¬Ò²ÐíÄã»áÒòΪֻ±£ÁôÁË×îа汾¶øÍ´¿ÞÁ÷Ìé¡£»¹ÓоÍÊÇÄã¶Ô³ÌÐò×öÁËһЩÐ޸ģ¬µ«ÊÇÐ޸ĺÜÉÙ£¬ÄãÖ»Ïë¸øÔ¶·½µÄͬÊ·¢Ò»¸öÁ½¸ö°æ±¾Ö®¼äµÄ²î±ðÎļþ£¬ÕâÑù¿ÉÒÔÃâÓÚÓÊÏä²»¹»´ó£¬ÍøËÙÌ«ÂýÖ®ÀàµÄÎÊÌ⡣ΪÁ˽â¾öÀàËÆÕâÑùµÄÎÊÌ⣬ÒÔ¼°ÖîÈçÉú³É²¹¶¡Îļþ£¬ÀúÊ·°æ±¾Ð޸ĵȣ¬Ò»°ïºÚ¿Í£¨°ýÒ壩ÔÚÔÏÈ Unix ÌåϵÀïºÜ³ÉÊìµÄ SCCS ºÍ RCS µÄ»ù´¡ÉÏ£¬¿ª·¢ÁË CVS.£¨SCCS£ºSource Code Control System£¬RCS£ºRevision Control System£©
CVS µÄ»ù±¾¹¤×÷˼·ÊÇÕâÑùµÄ£ºÔÚһ̨·þÎñÆ÷ÉϽ¨Á¢Ò»¸ö²Ö¿â£¬²Ö¿âÀï¿ÉÒÔ´æ·ÅÐí¶à²»Í¬ÏîÄ¿µÄÔ´³ÌÐò¡£Óɲֿâ¹ÜÀíԱͳһ¹ÜÀíÕâЩԴ³ÌÐò¡£ÕâÑù£¬¾ÍºÃÏóÖ»ÓÐÒ»¸öÈËÔÚÐÞ¸ÄÎļþÒ»Ñù¡£±ÜÃâÁ˳åÍ»¡£Ã¿¸öÓû§ÔÚʹÓòֿâ֮ǰ£¬Ê×ÏÈÒª°Ñ²Ö¿âÀïµÄÏîÄ¿ÎļþÏÂÔص½±¾µØ¡£Óû§×öµÄÈκÎÐÞ¸ÄÊ×Ïȶ¼ÊÇÔÚ±¾µØ½øÐУ¬È»ºóÓà cvs ÃüÁî½øÐÐÌá½»£¬ÓÉ cvs ²Ö¿â¹ÜÀíԱͳһÐ޸ġ£ÕâÑù¾Í¿ÉÒÔ×öµ½¸ú×ÙÎļþ±ä»¯£¬³åÍ»¿ØÖƵȵȡ£
ÓÉÓÚ CVS ÊǵäÐ굀 C/S ½á¹¹µÄÈí¼þ£¬Òò´ËËüÒ²·Ö³É·þÎñÆ÷¶ËºÍ¿Í»§¶ËÁ½²¿·Ö¡£²»¹ý´ó¶àÊý CVS Èí¼þ¶¼°ÑËüÃǺ϶þΪһÁË¡£
½áºÏÎĵµºÍһЩÍøÉÏ×ÊÔ´£¬ÎÒдһµã·Ç³£¼òµ¥µÄ¡°Ëٳɡ±µÄ½Ì²Ä£®Ï£Íû¶Ô´ó¼ÒÓÐÓã®
ÏÂÃæÊÇÎҵIJ½ÖèºÍ×ö·¨£º
Ç°ÌáÒªÇó£º root ȨÏÞ£» CVSÈí¼þ£¬ÇëÕÒµ½Ïà¹ØµÄrpm£¬tgz£¬deb µÈ°ü×°ÉÏ£¬»òÕßµ½ http://www.cvshome.org/CVS/Dev/code ÏÂÔØÔ³ÌÐò±àÒë°²×°£¬ÕâÀïÎÒ²»×¼±¸½éÉÜËüµÄ°²×°£¬Çë²Î¿¼CVS×ÔÉíµÄÎĵµ°²×°£®ÎÒʹÓÃSlackwareµÄtgz°ü£¬°²×°µÄÃüÁîÊÇ #installpkg cvs*.tgz ÆäËû°üÇë²Î¿¼¶ÔÓ¦°ü¹ÜÀí¹¤¾ßµÄÃüÁ Ò»¶¨µÄϵͳ×ÊÔ´£¬ÒªÓÐÒ»¶¨Äڴ棨32M¾ÍÄܹ¤×÷µÃºÜºÃ£©£¬ÒªÒ»¶¨µÄ´ÅÅ̿ռ䣬¿´ÄãµÄÏîÄ¿µÄ´óСºÍ¶àÉÙ¶ø¶¨£® ¼ÜÉèCVS·þÎñÆ÷£º ½¨Á¢ CVSROOT Ŀ¼£¬ÒòΪÕâÀïÉæ¼°µ½Óû§¶ÔCVSROOTÀïµÄÎļþ¶ÁдµÄȨÏÞÎÊÌ⣬ËùÒԱȽϼòµ¥µÄ·½·¨Êǽ¨Á¢Ò»¸ö×飬ȻºóÔÙ½¨Á¢Ò»¸öÊôÓÚ¸Ã×éµÄÕÊ»§£¬¶øÇÒÒÔºóÓжÁдȨÏÞµÄÓû§¶¼ÒªÊôÓÚ¸Ã×飮¼ÙÉèÎÒÃǽ¨Ò»¸ö×é½Ðcvs£¬Óû§ÃûÊÇcvsroot£®½¨×éºÍÓû§µÄÃüÁîÈçÏÂ
¡¡ #groupadd cvs #adduser cvsroot
¡¡
Éú³ÉµÄÓû§¼ÒĿ¼ÔÚ/home/cvsroot£¨¸ù¾Ý×Ô¼ºµÄϵͳµ÷Õû£©¡¡
Óà cvsroot Óû§µÇ½£¬ÐÞ¸Ä /home/cvsroot £¨CVSROOT£©µÄȨÏÞ£¬¸³Óëͬ×éÈËÓжÁдµÄȨÏÞ£º¡¡ $chmod 771 . £¨»òÕß770Ó¦¸ÃÒ²¿ÉÒÔ£©
×¢Ò⣺ÕâÒ»²¿·Ö¹¤×÷ÊÇ°´ÕÕÎĵµËµÃ÷×öµÄ£¬ÊÇ·ñÒ»¶¨ÐèÒªÕâÑùûÓÐÊÔÑ飬ÎÒ»áÔÚ×öÊÔÑéºóÔÚÒÔºó°æ±¾µÄ½Ì³Ì˵µÃ×Ðϸһµã£®Èç¹ûÄúÓÐÕâ·½ÃæµÄ¾ÑéÇëÌṩ¸øÎÒ£¬Ð»Ð»£®
½¨Á¢CVS²Ö¿â£¬£¨ÈÔÈ»ÊÇ cvsroot Óû§£©£¬ÓÃÏÂÃæÃüÁ¡¡ $cvs -d /home/cvsroot init
¡¡
ÒÔrootÉí·ÝµÇ½£¬ÐÞ¸Ä /etc/inetd.conf£¨Ê¹Óà xinetd µÄϵͳûÓдËÎļþ£©ºÍ /etc/services£¬Èç¹ûÓõÄÊÇ inetd µÄϵͳ£¬ÔÚ /etc/inetd.conf Àï¼ÓÈ룺 cvsserver stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/home/cvsroot pserver
˵Ã÷£ºÉÏÃæµÄÐÐÊǵ¥¶ÀÒ»ÕûÐУ¬/usr/bin/cvs Ó¦¸ÃÊÇÄãµÄcvs°æ±¾µÄÃüÁî·¾¶£¬Çë¸ù¾Ý×Ô¼ºµÄϵͳµ÷Õû£®/home/cvsroot ÊÇÄ㽨Á¢µÄCVSROOTµÄ·¾¶£¬Ò²Çë¸ù¾ÝÉÏÃ潨Á¢Ä¿Â¼µÄ²¿·ÖµÄÄÚÈÝ×öµ÷Õû£®
Èç¹ûÊÇʹÓà xinetd µÄϵͳ£¬ÐèÒªÔÚ /etc/xinetd.d/ Ŀ¼Ï´´½¨Îļþ cvspserver£¨´ËÃû×Ö¿ÉÒÔ×Ô¼º¶¨Ò壩£¬ÄÚÈÝÈçÏ£º
# default: on# description: The cvs server sessions;service cvsserver{socket_type = streamwait = nouser = rootserver = /usr/bin/cvsserver_args = -f --allow-root=/cvsroot pserverlog_on_failure += USERIDonly_from = 192.168.0.0/24}
ÆäÖÐonly_fromÊÇÓÃÀ´ÏÞÖÆ·ÃÎʵģ¬¿ÉÒÔ¸ù¾Ýʵ¼ÊÇé¿ö²»Òª»òÕßÐ޸ġ£Ð޸ĸÃÎļþȨÏÞ£º
# chmod 644 cvspserver
ÔÚ/etc/servicesÀï¼ÓÈ룺
cvsserver 2401/tcp
˵Ã÷£ºcvsserver ÊÇÈÎÒâµÄÃû³Æ£¬µ«ÊDz»ÄܺÍÒÑÓеķþÎñÖØÃû£¬Ò²ÒªºÍÉÏÃæÐÞ¸Ä /etc/inetd.conf ÄÇÐеĵÚÒ»ÏîÒ»Ö£®ÕâÀïÎÒÓõÄÊÇ CVS µÄ¿ÚÁîÈÏÖ¤·½Ê½£¬CVS »¹ÓÐÆäËûÈÏÖ¤·½Ê½£¬ÎÒûÓÐ×öÊÔÑ飬Èç¹ûÄúÓоÑ飬Çë²¹³ä£¬Ð»Ð»£®
Ìí¼Ó¿ÉÒÔʹÓà CVS ·þÎñµÄÓû§µ½ cvs ×飺 ÒÔ root Éí·ÝÐÞ¸Ä /etc/group£¬°ÑÐèҪʹÓà CVS µÄÓû§Ãû¼Óµ½ cvs ×éÀ±ÈÈçÎÒÏëÈÃÓû§ laser ºÍgumpwu Äܹ»Ê¹Óà CVS ·þÎñ£¬ÄÇôÐÞ¸ÄÒÔºóµÄ /etc/group Ó¦¸ÃÓÐÏÂÃæÕâÑùÒ»ÐУºcvs:x:105:laser,gumpwu
ÔÚÄãµÄϵͳÉÏGID¿ÉÄܲ»ÊÇ105£¬Ã»ÓйØϵ£®Ö÷ÒªÊÇÒª°ÑlaserºÍgumpwuÓöººÅ·Ö¸ô¿ªÐ´ÔÚ×îºóÒ»¸öðºÅºóÃ森µ±È»£¬ÏóRedHatµÈ·Ö·¢°æÓÐÀàËÆLinuxconfÕâÑùµÄ¹¤¾ßµÄ»°£¬Óù¤¾ß×öÕâ¼þÊ»á¸ü¼òµ¥Ð©£®
ÖØÆðinetdʹÐÞ¸ÄÉúЧ£º¡¡ #killall -HUP inetd
Èç¹ûʹÓõÄÊÇ xinetd µÄϵͳ£º
# /etc/rc.d/init.d/xined restart
ÕâÑù·þÎñÆ÷¾ÍÉèÖÃÍê³ÉÁË£®ÎÒÃǽÓןã¿Í»§¶Ë£®
ÉèÖÿͻ§¶Ë
Èç¹ûÊÇ Linux£¨»òÕßÆäËû *nix£©£¬¿Í»§¶ËºÍ·þÎñÆ÷¶ËµÄÈí¼þÊÇÒ»ÑùµÄ£¬Èç¹ûÊÇWin£¬MACµÈƽ̨£¬Çëµ½
http://www.loria.fr/cgi-bin/molli/wilma.cgi/rel
ÕÒÏàÓ¦µÄ¿Í»§¶ËÈí¼þ£¬ÕâÀïÎÒÏÈ˵һÏÂÔÚ Linux£¨*nix£©ÀïÔõô×ö£º ÉèÖû·¾³±äÁ¿CVSROOT£º
¡¡ $eXPort CVSROOT=:pserver:laser@the_server_name:/home/cvsroot
×¢Ò⣺ÕâÀïµÄpserverÊÇ·ÃÎÊ·½Ê½£¬ÎÒÔÚÉÏÃæÉèÖõÄÊÇ¿ÚÁîÈÏÖ¤£¬ËùÒÔÕâÀïÊÇpserver£¬Èç¹ûÄãµÄCVS·þÎñÆ÷ÉèÖóɱðµÄ·ÃÎÊģʽ£¬ÄÇôÐèÒªÏàÓ¦Ð޸ģ®laserÊÇ¿ÉÒÔʹÓà CVS·þÎñÆ÷µÄÓû§Ãû£¬ÕâÀï¿ÉÒÔ¸ù¾ÝÄãµÄÉèÖÃÐ޸ģ¬ÎÒÔÚÕâ¸ö°æ±¾ÉèÖõÄÊÇÖ±½ÓʹÓÃϵͳÓû§µÄ¿ÚÁîÎļþ£¬Ò²¾ÍÊÇ˵laser±ØÐëÊÇCVS·þÎñÆ÷ÉϵĺϷ¨Óû§£¬ÕâÀﵱȻÓа²È«ÎÊÌ⣬CVS¿ÉÒÔÉèÖóÉΪӵÓÐ×Ô¼ºµÄÓû§£¬ÎÒ½«ÔÚÒÔºóµÄ°æ±¾ÀïÃæÔö¼ÓÕâЩÄÚÈÝ£¬»òÕßÄúÒ²¿ÉÒÔÌṩһЩ²¹³ä£¬»òÕßÖ±½Ó¶ÁCVSµÄÎĵµ£®the_server_nameÊÇCVS·þÎñÆ÷µÄÃû³Æ»òÕßIPµØÖ·£¬¸ù¾ÝÄãµÄÇé¿öÌîд£¬/home/cvsrootÊÇÄãµÄCVS·þÎñÆ÷µÄCVSROOTĿ¼£¬¸ù¾ÝÄãµÄCVS·þÎñÆ÷ÉèÖÃ×öÐ޸ĻòÕßѯÎʹÜÀíÔ±£®Äã¿ÉÒÔ°ÑÕâÐзŵ½ÄãµÄshellµÄprofileÀ.bash_profile£¬.profileµÈ£©ÕâÑù¾Í²»ÓÃÿ´ÎÇÃÒ»³¤´®ÃüÁîÁË£®
µÇ½CVS·þÎñÆ÷£º¡¡ $ cvs login£¬Õâʱºò cvs »áÎÊÄã¿ÚÁÇë°ÑÄãÔÚ CVS ·þÎñÆ÷ÉϵĿÚÁîÇýøÈ¥£¬ÕâÀïÊÇ laser ÔÚ CVS·þÎñÆ÷ÉϵÄϵͳÓû§µÄ¿ÚÁ Passwd:xxxxxxxx
³É¹¦µÇ½ºó½«ÔÚÄãµÄ¼ÒĿ¼½¨Á¢Ò»¸ö .cvspass Îļþ£¬ÒÔºó¾Í²»ÓÃÊäÈë¿ÚÁîÁË£®
ºÃ£¬¿Í»§¶ËÉèÖÃÍê³É£¬¼òµ¥°É£®¹ÜÀí cvs ·þÎñÆ÷
·þÎñÆ÷¿ÉÒÔÓÃÁË£¬ÏÖÔÚ´ó¼Ò×î¹ØÐĵľÍÊÇÈçºÎ¹ÜÀí·þÎñÆ÷£¬±ÈÈ磬ÎÒÏëÈÃһЩÈËÓжÁºÍ/»òд CVS ²Ö¿âµÄȨÏÞ£¬µ«ÊDz»Ïë¸øËüϵͳȨÏÞÔõô°ìÄØ£¿
²»ÄÑ£¬ÔÚ cvs ¹ÜÀíÔ±Óû§£¨ÔÚÎÒÕâÀïÊÇ cvsroot Óû§£©µÄ¼ÒĿ¼ÀïÓÐÒ»¸ö CVSROOT Ŀ¼£¬Õâ¸öĿ¼ÀïÓÐÈý¸öÅäÖÃÎļþ£¬passwd, readers, writers£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÉèÖÃÕâÈý¸öÎļþÀ´ÅäÖà CVS ·þÎñÆ÷£¬ÏÂÃæ·Ö±ð½éÉÜÕ⼸¸öÎļþµÄ×÷Óãº
passwd£ºcvs Óû§µÄÓû§ÁбíÎļþ£¬ËüµÄ¸ñʽºÜÏó shadow Îļþ£º
{cvs Óû§Ãû}:[¼ÓÃܵĿÚÁî]:[µÈЧϵͳÓû§Ãû]
Èç¹ûÄãÏ£ÍûÒ»¸öÓû§Ö»ÊÇ cvs Óû§£¬¶ø²»ÊÇϵͳÓû§£¬ÄÇôÄã¾ÍÒªÉèÖÃÕâ¸öÎļþ£¬¸Õ¸Õ°²×°ÍêÖ®ºóÕâ¸öÎļþ¿ÉÄܲ»´æÔÚ£¬ÄãÐèÒªÒÔ cvs ¹ÜÀíÔ±Óû§ÊÖ¹¤´´½¨£¬µ±È»Òª°´ÕÕÉÏÃæ¸ñʽ£¬µÚ¶þ¸ö×Ö¶ÎÊǸÃÓû§µÄ¼ÓÃÜ¿ÚÁ¾ÍÊÇÓà crypt (3) ¼ÓÃܵģ¬Äã¿ÉÒÔ×Ô¼ºÐ´Ò»¸ö³ÌÐòÀ´×ö¼ÓÃÜ£¬Ò²¿ÉÒÔÓÃÎÒ½éÉܵÄ͵ÀÁµÄ·½·¨£ºÏÈ´´½¨Ò»¸öϵͳÓû§£¬Ãû×ÖºÍ cvs Óû§Ò»Ñù£¬¿ÚÁî¾ÍÊÇ×¼±¸¸øËüµÄ cvs Óû§¿ÚÁ´´½¨ÍêÖ®ºó´Ó /etc/shadow °Ñ¸ÃÓû§µÚ¶þ¸ö×ֶο½±´¹ýÀ´£¬È»ºóÔÙ°ÑÕâ¸öÓû§É¾³ý£®Õâ¸ö·½·¨¶Ô¸¶ÊýÁ¿ÉÙµÄÓû§±È½Ï·½±ã£¬ÈËÒ»¶à¾Í²»ºÏÊÊÁË£¬¶øÇÒ»¹ÓгåÍ»Ìõ¼þ(race condition)µÄ°²È«Òþ»¼£¬»¹Òª root ȨÏÞ£¬ÊµÔÚ²»ÔõôÑù£®²»¹ýȨÒæÖ®¼Æ¶øÒÑ£®Ð´Ò»¸öС³ÌÐò²¢²»ÄÑ£¬¿ÉÒÔµ½ linuxforum µÄ±à³Ì°æËÑË÷һϣ¬ÓиöÅóÓÑÒѾдÁËÒ»¸öÌùÔÚÉÏÃæÁË£®
µÚÈý¸ö×ֶξÍÊǵÈЧϵͳÓû§Ãû£¬Êµ¼ÊÉϾÍÊǸ³ÓëÒ»¸ö cvs Óû§Ò»¸öµÈЧµÄϵͳÓû§µÄȨÏÞ£¬¿´ÏÂÃæµÄÀý×ÓÄã¾ÍÃ÷°×ËüµÄ¹¦ÄÜÁË£®
readers£ºÓÐ cvs ¶ÁȨÏÞµÄÓû§ÁбíÎļþ£®¾ÍÊÇÒ»¸öһάÁÐ±í£®ÔÚÕâ¸öÎļþÖеÄÓû§¶Ô cvsÖ»ÓжÁȨÏÞ£®
writers£ºÓÐ cvs дȨÏÞµÄÓû§µÄÁбíÎļþ£®ºÍ readers Ò»Ñù£¬ÊÇÒ»¸öһάÁÐ±í£®ÔÚÕâ¸öÎļþÖеÄÓû§¶Ô cvs ÓÐдȨÏÞ£®
ÉÏÃæÈý¸öÎļþÔÚȱʡ°²×°µÄʱºò¿ÉÄܶ¼²»´æÔÚ£¬ÐèÒªÎÒÃÇ×Ô¼º´´½¨£¬ºÃ°É£¬ÏÖÔÚ»¹ÊÇÈÃÎÒÃÇÓÃÒ»¸öÀý×ÓÀ´½Ìѧ°É£®¼ÙÉèÎÒÃÇÓÐÏÂÃ漸¸öÓû§ÐèҪʹÓà cvs£º
laser, gumpwu, henry, betty, anonymous£®
ÆäÖÐ laser ºÍ gumpwu ÊÇϵͳÓû§£¬¶ø henry, betty, anonymous ÎÒÃǶ¼²»Ïë¸øϵͳÓû§È¨ÏÞ£¬²¢ÇÒ betty ºÍ anonymous ¶¼ÊÇÖ»¶ÁÓû§£¬¶øÇÒ anonymous ¸üÊÇÁ¬¿ÚÁûÓУ®ÄÇôºÃ£¬ÎÒÃÇÏÈ×öһЩ׼±¸¹¤×÷£¬ÏÈ´´½¨Ò»¸ö cvspub Óû§£¬Õâ¸öÓû§µÄÔðÈÎÊÇ´ú±íËùÓзÇϵͳÓû§µÄ cvs Óû§¶Áд cvs ²Ö¿â£®
#adduser ...
È»ºó±à¼ /etc/group£¬Áî cvspub Óû§ÔÚ cvs ×éÀͬʱ°ÑÆäËüÓÐϵͳÓû§È¨ÏÞµÄÓû§¼Óµ½ cvs ×éÀ£¨¼ûÉÏÎÄ£©
È»ºó±à¼ cvs ¹ÜÀíÔ±¼ÒĿ¼Àï CVSROOT/passwd Îļþ£¬¼ÓÈëÏÂÃ漸ÐУº
laser:$xxefajfka;faffa33:cvspub gumpwu:$ajfaal;323r0ofeeanv:cvspub henry:$fajkdpaieje:cvspub betty:fjkal;ffjieinfn/:cvspub anonymous::cvspub
×¢Ò⣺ÉÏÃæµÄµÚ¶þ¸ö×ֶΣ¨·Ö¸ô·ûΪ :£©ÊÇÃÜÎÄ¿ÚÁÄãÒªÓóÌÐò»òÕßÓÃÎÒµÄÍÁ°ì·¨Éú³É£®
±à¼ readers Îļþ£¬¼ÓÈëÏÂÃ漸ÐУº
anonymous betty
±à¼ writer Îļþ£¬¼ÓÈëÏÂÃ漸ÐУº
laser gumpwu henry
ÕâÑù¾Í ok ÁË£¬ÄãÔÙÓü¸¸öÓû§·Ö±ðµÇ½²âÊÔ£¬¾Í»á·¢ÏÖÒ»Çж¼ ok ÁË£®ÕâÀïÃæµÄÔÀíºÍ˵Ã÷ÎÒÏë¾Í²»¶à˵ÁË£¬ÆäʵºÜ¼òµ¥£¬ºÍϵͳ¹ÜÀíÓû§µÄ¸ÅÄîÊÇÒ»ÑùµÄ£®
ÏÖÔÚ·þÎñÆ÷ºÍ¿Í»§¶Ë¶¼ÉèÖúÃÁË£¬ÄÇôÔõôÓÃÄØ£¬ÎÒÔÚÕâÀïдһ¸ö×î¼òµ¥µÄ£¨¹À¼ÆÒ²ÊÇ×î³£Óõģ©ÃüÁî½éÉÜ£º
Ê×ÏÈ£¬½¨Á¢Ò»¸öеÄCVSÏîÄ¿£¬Ò»°ãÎÒÃǶ¼ÒѾÓÐһЩÏîÄ¿ÎļþÁË£¬ÕâÑùÎÒÃÇ¿ÉÒÔÓÃÏÂÃæ²½ÖèÉú³ÉÒ»¸öеÄCVSÏîÄ¿£º ½øÈëµ½ÄãµÄÒÑÓÐÏîÄ¿µÄĿ¼£¬±ÈÈç½Ð cvstest£º $cd cvstest ÔËÐÐÃüÁ $cvs import -m "this is a cvstest project" cvstest v_0_0_1 start ˵Ã÷£ºimport ÊÇcvsµÄÃüÁîÖ®Ò»£¬±íʾÏòcvs²Ö¿âÊäÈëÏîÄ¿Îļþ£® -m²ÎÊýºóÃæµÄ×Ö´®ÊÇÃèÊöÎı¾£¬Ëæ±ãдЩÓÐÒâÒåµÄ¶«Î÷£¬Èç¹û²»¼Ó -m ²Î Êý£¬ÄÇôcvs»á×Ô¶¯ÔËÐÐÒ»¸ö±à¼Æ÷£¨Ò»°ãÊÇvi£¬µ«ÊÇ¿ÉÒÔͨ¹ýÐ޸Ļ·¾³±äÁ¿ EDITORÀ´¸Ä³ÉÄãϲ»¶Óõıà¼Æ÷£®£©ÈÃÄãÊäÈëÐÅÏ¢£¬ cvstest ÊÇÏîÄ¿Ãû³Æ£¨Êµ¼ÊÉÏÊDzֿâÃû£¬ÔÚCVS·þÎñÆ÷ÉÏ»á´æ´¢ÔÚÒÔÕâ¸öÃû×Ö ÃüÃûµÄ²Ö¿âÀ£© v_0_0_1ÊÇÕâ¸ö·ÖÖ§µÄ×ܱê¼Ç£®Ã»É¶Ó㨻òÔ»²»³£Ó㮣© start ÊÇÿ´Î import ±êʶÎļþµÄÊäÈë²ã´ÎµÄ±ê¼Ç£¬Ã»É¶Óã®ÕâÑùÎÒÃǾͽ¨Á¢ÁËÒ»¸öCVS²Ö¿âÁË£¬È»ºó£¬ÎÒÃÇ¿ÉÒÔ°ÑÕâ¸ö²âÊÔÏîÄ¿µÄÎļþɾ³ý£®ÊÔÑéÒ»ÏÂÈçºÎ´Ó²Ö¿â»ñÈ¡Îļþ£®ÕâÀïÎÒ¼ÙÉèÉÏÃæµÄËùÓпͻ§¶Ë¹¤×÷Ä㶼ÒѾ×ö¹ýÁË£® ÔËÐÐÏÂÃæµÄÃüÁ $cvs checkout cvstest´Ó²Ö¿âÖмìË÷³öcvstestÏîÄ¿µÄÔ´Îļþ£® Èç¹ûÄãÒѾ×ö¹ýÒ»´ÎcheckoutÁË£¬ÄÇô²»ÐèÒªÖØÐÂcheckout£¬Ö»ÐèÒª½øÈëcvstestÏîÄ¿µÄĿ¼£¬¸üÐÂÒ»°Ñ¾ÍÐÐÁË£º $cd cvstest $cvs updateһϼ´¿É£®ÓÖ»òÕßÄã²»ÏëÖ±½Ó¸üУ¬Ö»ÊÇÏë¿´¿´ÓÐûÓиüеĶ«Î÷£¬ÄÇô£º $cvs statusÕâʱºó»á´òÓ¡³öÒ»³¤´®×´Ì¬±¨¸æ£¨Äã¿ÉÄÜÐèÒªÓÃÀàËÆlessÕâÑùµÄÃüÁî·ÖÒ³ÏÔʾ£¬»òÕ߶¨Ïòµ½Ò»¸öÊä³öÎļþÀïÂýÂý¿´£®£©£¬¶ÔÏîÄ¿ÖеÄÿ¸öÎļþÓÐÒ»·Ý״̬±¨¸æ£¬ÀàËÆÕâÑù£º =================================================================== File: foo.c Status: Up-to-date
Working revision: 1.1.1.1 'Some Date' Repository revision: 1.2 /home/cvsroot/cvstest/foo.c,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none)
ÕâÀï×îÖØÒªµÄ¾ÍÊÇ Status À¸£¬ÕâÀï×ܹ²¿ÉÄÜÓÐËÄÖÖ״̬£º Up-to-date£º±íÃ÷ÄãÒªµ½µÄÎļþÊÇ×îеģ® Locally Modified£º±íÃ÷ÄãÔø¾Ð޸Ĺý¸ÃÎļþ£¬µ«»¹Ã»ÓÐÌá½»£¬ÄãµÄ°æ±¾±È²Ö¿âÀïµÄУ® Needing Patch£º±íÃ÷Óиö¸çÃÇÒѾÐ޸Ĺý¸ÃÎļþ²¢ÇÒÒѾÌá½»ÁË£¡ÄãµÄ°æ±¾±È²Ö¿âÀïµÄ¾É£® Needs Merge£º±íÃ÷ÄãÔø¾Ð޸Ĺý¸ÃÎļþ£¬µ«ÊÇÆ«Æ«Óиö²»Ê¶ÏàµÄÒ²ÐÞ¸ÄÁËÕâ¸öÎļþ£¬¶øÇÒ»¹Ìá½»¸ø²Ö¿âÁË£¡
Èç¹ûÄãÖ»ÊÇÏë±£³ÖÈí¼þµÄͬ²½µÄ»°£¨ÏóÎÒ£©£¬ÄÇôÉÏÃæµÄ¶«Î÷¾Í×ã¹»ÓÃÁË£®¿ÉÊÇÈç¹û¶àÈËÐ×÷¿ª·¢ÏîÄ¿µÄ»°£¬¿É¾Í²»ÊÇÁËÕâô¼òµ¥ÁË£®µ±Äã²Î¼ÓÏîÄ¿£¬Î¬»¤Îļþʱ£¬¾ÍÐèÒª¸ü¶àÃüÁ±ÈÈç˵ÄãÎÒ¶¼ÊÇij nasdaq ÏîÄ¿µÄ¿ª·¢ÈËÔ±£º
1£¬Äã¶Ôij¸öÎļþ×öÁËÐ޸ģ¬±ÈÈç˵¸ÄÁËceo.c£¬¼ÓÁËÒ»ÐгÌÐò£ºprintf("where can I find VC to cheat!"); ¸ÄÍêÖ®ºóÄãÒª°ÑÐÞ¸ÄÌá½»¸ø²Ö¿â£¬ÓÃÃüÁ $cvs commit -m "add a complain" ceo.c »òÕß¾ÍÊÇ£º $cvs commit -m "worry about money" ÈÃcvs°ïÄã¼ì²éÄĸöÎļþÐèÒªÌá½»£®
2£¬µ±ÎÒ¿ªÊ¼¸É»îµÄʱºò£¬¿ÉÄÜÎÒÏÈ£º $cvs status Ò»°Ñ£¬ÕâʱºòÎһῴµ½£º
================================================================== File: ceo.c Status: Needing Patch
Working revision: 1.1.1.1 'Some Date' Repository revision: 1.2 /home/cvsroot/nastaq/ceo.c,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none)
ÓÚÊÇÎÒÖªµÀÓÐÈ˸ÄÁËceo.c£¬ÓÚÊÇÎҾͣº $cvs update ceo.c »òÕ߸ɴࣺ $cvs update °Ñceo.cÕâ¸öÎļþ¸üÐÂΪ×îа汾£¬È»ºóÔٸɻȻºóÌá½»£®
Èç¹ûÕâÌìÄãÐÞ¸ÄÁËcoo.c£¬¼ÓÁËÒ»ÐÐ puts("how about another kind of bragging?"); ²¢ÇÒÌá½»ÁË£¬µ«ÊÇÕâʱºòÎÒÒѾ $cvs status ¹ýÁË£¬¾ÍÊÇ˵ÎÒ²»ÖªµÀÄãµÄÐ޸ģ® ¶øÎÒ¼ÓÁËÒ»ÐÐprintf("You must shamelessly and seems knowingness to act as a coo"); ²¢ÇÒɵºõºõµØÌá½»£º $cvs commit coo.c Õâʱºò£¬CVS»á¸æËßÎÒ cvs commit: Examing . cvs server: Up-to-date check failed for 'coo.c' cvs [server aborted]: correct above error first!
ÓÚÊÇÎÒÖªµÀÓиö¹·ÊºÔÚÎÒÐÞ¸ÄÎļþµÄµ±¿Ú×öÁËÌá½»£¬ÓÚÊÇÎÒ $cvs update Õâʱcvs»á±¨¸æ£º RCS file: /home/cvsroot/nasdaq/coo.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 Merging differences between 1.1.1.1 and 1.2 into coo.c rcsmerge: warning: conflicts during merge cvs update: conflicts found in coo.c C coo.c ¸æËßÄãcoo.cÓа汾³åÍ»£¬ÓÚÊÇÎÒ±à¼coo.c£¬Õâʱһ°ãÎļþÀï¿´ÆðÀ´ÏóÕâÑù£º ... printf("You must shamelessly and seems knowingness to act as a coo"); <<<<<<< foo.c ======= ... puts("how about another kind of bragging?"); >>>>>>> 1.2 ...
ÓÚÊÇÎÒ°ÑÉÏÃæ¸Ä³É£º printf("You must shamelessly and seems knowingness to act as a coo"); puts("how about another kind of bragging?"); È»ºó $cvs commit -m "merged" coo.c ÓÚÊÇÏ»ØÄãÔÙ¸üеÄʱºò¾ÍÓÐеIJ¹¶¤Òª´ò£®£®£®Èç´ËÍù¸´£¬Ö±µ½Íê³ÉËùÓÐÐ޸ģ® ²»¹ýÕâÀïÓÐһЩҪעÒâµÄµØ·½¾ÍÊÇɾ³ý³ÌÐò£¬Èç¹ûÄãɾµôÒ»ÐжÔÄã¿ÉÄÜûÓÐÓõijÌÐò puts("to be honest"); ¶øÎÒ²»Ïëɾ³ý£¨ÒòΪÎÒÓÐÓã©£¬¶øÎÒ²»ÖªÇéµØÖ±½Ó£º $cvs update ÁË£¬ÄÇôÎÒµÄÕâÐгÌÐòÒ²Íêµ°ÁË£¬ËùÒÔÕâÀïÎÒÃÇҪעÒâËùÓпª·¢ÈËÔ±µÄе÷£¬Ç§Íò²»ÒªÂÒɾ¶«Î÷£¬´ó²»ÁËÓà #if 0 #endif ºê¶¨Òå¶ÔÀ¨ÆðÀ´£®ÊµÔÚҪɾ¶«Î÷£¬ÄÇ×îºÃÏȱê¼ÇÒ»¸ö°æ±¾£º $cvs tag v_0_0_1
È»ºóÄã¿ÉÒÔ·¢²¼²¢É¾³ýÄã×Ô¼ºµÄ¹¤×÷Ŀ¼ÀïÕâ¸ö°æ±¾µÄÎļþ£¨×¢Ò⣺²»ÊÇɾ³ý²Ö¿âÀïµÄ£®£©£º
$cvs release -d nasdaq
È»ºóÄãÔÙÉú³ÉÒ»¸öзÖÖ§£º
$cvs rtag -b -r v_0_0_1 v_0_0_1_1 nasdaq
È»ºóÔÙ½¨Á¢v_0_0_1_1µÄ·ÖÖ§
$cvs checkout -r v_0_0_1_1 nasdaq
±à¼²¢ÐÞ¸ÄÕâ¸ö·ÖÖ§µÄÎļþ£¬ÕâÑùµÄ×ö·¨±È½ÏºÃ£®
²»¹ýҪעÒâµÄÊÇ£¬Ð±ê¼ÇºÍзÖÖ§µÄ½¨Á¢×îºÃÓÉÏîÄ¿µÄ¹ÜÀíÈËÔ±¸ºÔ𣬷ñÔòÿ¸öÈ˶¼×öÒ»¸ö·ÖÖ§£¬ÄÇô²Ö¿â¾ÍÌ«ÂÒÁË£®Òò´Ë£¬±È½ÏµÄ¿ª·¢ÈËÔ±Ö®¼äµÄÖ±½Ó¹µÍ¨ÊDz»ÄܺöÂԵģ®Ò»°ãÀ´Ëµ£¬ÔÚ»¥ÁªÍøÉϵıê׼ģʽÊÇÓÐÒ»¸ö¹ÜÀíÔ±£¨¿ÉÄÜ×Ô¼º²¢²»Ð´³ÌÐò£©£¬ÓÐÒ»¸öÓʵÝÁÐ±í£¬´ó¼Ò¶¼ÔÚÓʵÝÁбíÉϽ»Á÷¿´·¨ºÍ×ö¸÷ÖÖ¾öÒ飮µ±ÐγɾöÒéÖ®ºó£¬¹ÜÀíÔ±×öÒ»¸öа汾µÄ±ê¼Ç£®ÒÔ´ËÑ»·£®
»¹ÓÐһЩÃüÁ±ÈÈçÒªÔö¼ÓÒ»¸öÎļþ garbage_china_concept_stocks_list£º
$cvs add garbage_china_concept_stocks_list
È»ºó»¹Òª£º
$cvs commit garbage_china_concert_stocks_list
¿´ÆðÀ´ÓеãÏóÊý¾Ý¿âÀïµÄÊÂÎñ£¿µÄÈ·ÊÇÕâÑù£®CVSά»¤×ÅÒ»¸ö±¾µØµÄ²Î¿¼Îļþ£¨ÔÚCVS/EntriesÀ£¬ÕâÑùÌá½»µÄʱºò¾Í¿ÉÒÔÒ»´ÎµØ°ÑËùÓиıä·Åµ½·þÎñÆ÷¶Ë£¬ÕâÑùÒ²¸ü°²È«£®Í¬Ñù£¬Èç¹ûÏëɾ³ýÎļþ bankrupted_web_site£º
$rm bankrupted_web_site $cvs remove bankrupted_web_site $cvs commit bankrupted_web_site
3£¬Ò»Ð©Ð¡¼¼ÇÉ£º $Header$ ±ê¼Ç£º°ÑÕâ¸ö±ê¼Ç·ÅÔÚÎļþµÄÈκεط½¶¼»á±» cvs Ìæ»»³É×îºóÐÞ¸ÄµÄ cvs Óû§Ãû£¬¸ÃÎļþµ±Ç°°æ±¾ºÅ£¬×îºóÐÞ¸Äʱ¼ä£¬¸ÃÎļþµÄ cvs ²Ö¿â·¾¶£¬¿´ÆðÀ´ÏóÏÂÃæÕâ¸öÑù×Ó£º
// $Header: /home/cvsroot/simhost/simhost.cpp,v 1.2 2001/04/20 08:26:10 jqliu Exp $
Ò»°ãÎÒÃÇ°ÑËü·ÅÔÚ¿ªÍ·£¬ÕâÑù¶Ô³ÌÐòÔ±ÐÞ¸ÄÎļþ·Ç³£±ãÀû£¬ºÜ¶àʱºòÄãÖ»Òª¿´Ò»ÑÛ¿ªÍ·¾ÍÖªµÀÎļþÊÇ·ñ×îУ®
$Id$±ê¼Ç£º°ÑÕâ¸ö±ê¼Ç·ÅÔÚÎļþµÄÈκεط½¶¼»á±» cvs Ìæ»»³É×îºóÐÞ¸ÄµÄ cvs Óû§Ãû£¬¸ÃÎļþµ±Ç°°æ±¾ºÅ£¬×îºóÐÞ¸Äʱ¼ä£¬¸ÃÎļþµÄ cvs ²Ö¿â·¾¶£¬¿´ÆðÀ´ÏóÏÂÃæÕâ¸öÑù×Ó£º
$Id: simhost.cpp,v 1.3 2001/04/24 02:27:36 simhost Exp $
ºÃÁË£¬ÉÏÃæËùÓеĶ«Î÷£¬¹À¼Æ¾ÍÊÇÎÒÃÇÓÃcvsʱ80%Çé¿öÏÂÓõÄÃüÁîºÍÄÚÈÝ£¬°üÀ¨ÎļþµÄ¸üУ¬Ìá½»£¬³åÍ»µÄ½â¾ö£¬·ÖÖ§µÄÅÉÉú£¬ÔöɾÎļþµÈ£®Êµ¼ÊÉÏcvsµÄ¹¦ÄÜ֮ǿ´ó£¬Ô¶Ô¶³¬³öÎÒÔÚÕâÀïÃèÊöµÄÄÚÈÝ£¬ÎÒÕâ¸ö£¢Ëٳɣ¢Ò²¾Í¹Ü²»ÁËÌ«¶àÁË£¬Ï£ÍûËæ×Åʱ¼äµÄÍÆÒÆ£¬ÎÒÃÇÄܹ»¸ü¼ÓÓÐЧµØʹÓÃCVS£®Ò²Ï£Íû´ó¼ÒÄܹ»²»¶Ï²¹³äÕâƪÎÄÕ£¬×îºóÄܹ»³ÉΪÊֲᣬ¶ø²»½ö½öÊÇËٳɣ®µ±È»£¬»¹Òª¸ü¶àµØ²Î¿¼±ðµÄÎĵµ£®
£¨³ö´¦£ºhttp://www.sheup.com£©