CVS/Tips
CVS ÆÁ ¶1.1. CVSROOT ÀÇ Á¤È®ÇÑ »ç¿ë ¶CVSROOT ȯ°æº¯¼ö´Â CVS ·Î i/o µÇ´Â ÆÄÀÏÀÇ À§Ä¡¸¦ ÁöÁ¤ÇÏ´Â SHELL ȯ°æº¯¼öÀÌ´Ù. ±×·¯³ª CVSROOT ´Â ÃʱâÀÇ ÆÄÀÏ import ³ª checkout ¿¡¼ ÇÊ¿äÇÒ»Ó ÀÌ¹Ì checkout µÈ ÆÄÀÏÀ» ÀÛ¾÷Çϴµ¥´Â ÇÊ¿äÇÏÁö ¾Ê´Ù.
º¸Åë CVSROOT ´Â ´ÙÀ½ÀÌ µÑ ÁßÀÇ ÇϳªÀÌ´Ù.
# echo $CVSROOT /home/CVSROOT # ÀÌ°ÍÀº ÆÄÀÏÀÇ ÀúÀåÀÌ ·ÎÄýýºÅÛ¿¡ ÀÌ·ç¾î Áú¶§ÀÌ´Ù. ÀÌ °æ¿ì´Â º°·Î ¾Ë¾Æ¾ßÇÒ ³»¿ëÀÌ ¾øÀ¸¹Ç·Î ³Ñ¾î°£´Ù.
# echo $CVSROOT :ext:@devel.sds.co.kr:/home/CVSROOT # ÀÌ °æ¿ì´Â ÆÄÀÏÀÇ ÀúÀåÀÌ ¸®¸ðÆ®½Ã½ºÅÛ¿¡ ÀÌ·ç¾î Áú¶§ÀÌ´Ù.
¿©±â¼ "ext" ´Â ¸®¸ðÆ®½Ã½ºÅÛÀÓÀ» ³ªÅ¸³»¸ç, "@devel.sds.co.kr" Àº ¼¹öÀÇ ÁÖ¼Ò¸¦ "@" ¾Õ¿¡´Â °èÁ¤id °¡ µé¾î°¥ ¼ö ÀÖ´Ù. "/home/CVSROOT" ´Â CVS ÆÄÀÏÀÌ ÀúÀåµÇ´Â ÀúÀå¼Ò¸¦ ¸»ÇÑ´Ù. ÇöÀçÀÇ ¿É¼ÇÀ» º¸¸é "@"¾Õ¿¡ °èÁ¤ÀÌ ÁöÁ¤µÇ¾î ÀÖÁö ¾ÊÀ¸¹Ç·Î ÇöÀç ·Î±×ÀÎµÈ °èÁ¤À¸·Î 󸮸¦ ÇÏ°Ô µÈ´Ù.
CVSROOT °¡ ¾ø´õ¶óµµ 󸮸¦ ÇÒ¼ö ÀÖ´Â °æ¿ì°¡ Àִµ¥, ±× °æ¿ì´Â ÇØ´ç µð·ºÅ丮¿¡ CVS µð·ºÅ丮°¡ Á¸ÀçÇÏ´Â °æ¿ìÀÌ´Ù. CVS µð·ºÅ丮¿¡ º¸¸é Root ¶ó´Â ÆÄÀÏÀÌ Àִµ¥ ³»¿ëÀ» È®ÀÎÇØ º¸¸é ¹Ù·Î CVSROOT ÀÇ ³»¿ë°ú µ¿ÀÏÇÏ´Ù.
# echo CVS/Root :ext:@devel.sds.co.kr:/home/CVSROOT # ±×¿Ü¿¡ CVS ÆÄÀÏ¿¡´Â Entries ¿Í Respository ÆÄÀÏÀÌ Àִµ¥ ¸®¸ðÆ®ÀÇ CVS ¿Í µ¿±âÈ ÇÏ´Â ÆÄÀÏÀ̹ǷΠÀÓÀ¸·Î ÆíÁýÇϴ°ÍÀº Á¤½Å°Ç°¿¡ ÇØ·Ó´Ù. --;;
¸®¸ðÆ® CVS ½Ã½ºÅÛ¿¡ Á¢±ÙÇÏ·Á¸é "CVS_RSH" ȯ°æº¯¼ö°¡ ÇÊ¿äÇÏ´Ù. ÁöÁ¤µÇÁö ¾ÊÀ¸¸é rsh ¸¦ ÀÌ¿ëÇϳª ¿äÁò¿¡ rsh Á¢±ÙÀ» Çã¿ëÇÏ´Â ½Ã½ºÅÛÀº ¾øÀ¸¹Ç·Î ssh ¸¦ ÁöÁ¤ÇØ ÁÖ¾î¾ß ÇÑ´Ù.
export CVS_RSH=ssh ¸ðµç ºÎºÐÀÌ ÁغñµÇ¾úÀ¸¸é CVS ¸¦ ½ÃÀÛÇÏ´Â ¸í·ÉÀº?
# cvs import -m "CVS start" CVS_START CVS_START init ±×·¯¸é ÇöÀçÀÇ µð·ºÅ丮 ¾Æ·¡¿¡ ÀÖ´Â ¸ðµç ÆÄÀÏÀ» "CVS_START" ¶ó´Â ÇÁ·ÎÁ§Æ®·Î CVS ¿¡ µî·ÏÇÑ´Ù.
1.2. »èÁ¦µÈ ÆÄÀÏÀÇ º¹±¸ ¶´õ ÀÌ»ó ÇÊ¿ä ¾øÀ»°Í °°¾Æ¼ »èÁ¦µÈ ÆÄÀÏÀÇ º¹±¸´Â ´Ù½Ã add ·Î¼ Ãß°¡ ½ÃŲ´Ù. ÆÄÀÏÀÌ Çö µð·ºÅ丮¿¡ ¾øÀ» °æ¿ì¿¡´Â »èÁ¦µÇ±â ÀÌÀü ¹öÀüÀÇ ÆÄÀÏÀ» ¶³¾î ¶ß¸®¸é¼ Ãß°¡µÈ´Ù.
$ cvs add mail_view_origin.tpl winchild@devel.sds.co.kr's password: cvs add: Resurrecting file `mail_view_origin.tpl' from revision 1.1. cvs add: Re-adding file `mail_view_origin.tpl' (in place of dead revision 1.2). U mail_view_origin.tpl cvs add: use 'cvs commit' to add this file permanently # Áï ¹öÀü 1.1 ÆÄÀÏÀ» ¶³¾î¶ß¸®¸é¼ add °¡ µÈ°ÍÀ» º¸¿© ÁÖ°í ÀÖ´Ù. ±×·¯¸é ÇÊ¿äÇÑ ´ë·Î ÆÄÀÏÀ» Ãß°¡·Î ÆíÁýÇÑ ÈÄ¿¡ commit À¸·Î Ãß°¡ÇÑ´Ù.
# vi mail_view_origin.tpl # cvs commit mail_view_origin.tpl winchild@devel.sds.co.kr's password: Checking in mail_view_origin.tpl; /data/mailnara/webmail-v2.x/templates/templates/main/blue1/korean/mail/mail_view_origin.tpl,v <-- mail_view_origin.tpl new revision: 1.3; previous revision: 1.2 done # ±×·¯¸é »èÁ¦ ¹öÀüÀÎ 1.2 ¿¡¼ 1.3 À¸·Î º¯°æµÇ¸é¼ ÆÄÀÏÀÌ º¹±¸°¡ µÈ´Ù.
1.3. ±¸ ¹öÀü ÆÄÀÏÀ» »õ ¹öÀüÆÄÀÏ·Î ¶ÀÛ¾÷À» ÇÏ´Ù°¡ º¸¸é, Áö±Ý ÁøÇàÁßÀÎ ¹öÀüÀ» ¹«½ÃÇÏ°í, ±¸ ¹öÀüÀ» ÇöÀçÀÇ ¹öÀüÀ¸·Î ´ëÄ¡ÇÏ¿© °è¼Ó ÀÛ¾÷À» ÇØ°¡¾ß ÇÒ »óȲÀÌ ¹ß»ýÇÏ°Ô µÈ´Ù. log ¸¦ È®ÀÎÇØ º¸¸é 1.2 ±îÁö ÁøÇàµÈ°ÍÀ» È®ÀÎÇÒ ¼ö ÀÖ´Ù.
$ cvs log testfile.php RCS file: /data/CVSROOT/PJWKREPORT/testfile.php,v Working file: testfile.php head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2006/02/01 16:13:55; author: winchild; state: Exp; lines: +2 -1 TEST2 ---------------------------- revision 1.1 date: 2006/02/01 16:13:17; author: winchild; state: Exp; Å×슽. ============================================================================= ¿ì¼± ¸®ºñÀü 1.1 ÀÇ ÆÄÀÏÀ» ¾ò¾î¿Â´Ù.
$ cvs update -r1.1 testfile.php U testfile.php »óŸ¦ È®ÀÎÇØ º¸¸é 1.1 ¿¡¼ Sticky Tag °¡ °É¸°°ÍÀ» È®ÀÎÇØ º¼¼ö ÀÖ´Ù.
$ cvs status testfile.php =================================================================== File: testfile.php Status: Locally Modified Working revision: 1.1 Wed Feb 1 16:14:06 2006 Repository revision: 1.1 /data/CVSROOT/PJWKREPORT/testfile.php,v Sticky Tag: 1.1 Sticky Date: (none) Sticky Options: (none) ¿ì¼± ÇöÀçÀÇ ÆÄÀÏÀ» ÀÓ½ÃÀå¼Ò·Î ¿Å±ä´Ù.
$ mv testfile.php /tmp ±×¸®°í ÇöÀçÀÇ ¹öÀü ÆÄÀÏÀ» ´Ù½Ã ¹Þ´Â´Ù. À̶§ ½ºÆ¼Å°Å±׸¦ ¾ø¾Ö±â À§Çؼ "-A" ¿É¼ÇÀ» »ç¿ëÇÑ´Ù.
]$ cvs update -A testfile.php cvs update: warning: testfile.php was lost U testfile.php [winchild@sdsmngr intranet]$ cvs status testfile.php =================================================================== File: testfile.php Status: Up-to-date Working revision: 1.2 Wed Feb 1 16:19:45 2006 Repository revision: 1.2 /data/CVSROOT/PJWKREPORT/testfile.php,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) ÀÌ·¸°Ô ÇØ¾ß "commit" ¿¡¼ ÃֽŹöÀüÀ¸·Î Ä¿¹Ô µÇ°Ô µÈ´Ù.
ÆÄÀÏÀ» µÇµ¹·Á ³õ°í (Overwrite) ÇÊ¿äÇÑ ºÎºÐÀ» ¼öÁ¤ÇÑ ÈÄ Ä¿¹ÔÇÑ´Ù.
$ mv /tmp/testfile.php . $ vi testfile.php $ cvs commit testfile.php Checking in testfile.php; /data/CVSROOT/PJWKREPORT/testfile.php,v <-- testfile.php new revision: 1.3; previous revision: 1.2 done 1.4. CVS ·Î µ¥ÀÌÅ͸¦ »ý¼ºÇÒ ¶§ ÆÄÀÏ ÆÛ¹Ì¼Ç ¹®Á¦ ¶ÇöÀçÀÇ µð·ºÅ丮 ¾Æ·¡ÀÇ ¸ðµç µð·ºÅ丮ÀÇ access ¸ðµå¸¦ 775 ·Î º¯°æÇϱâ.
# find . \( -type d -a -exec chmod 775 {} \; \) # find . \( -name "*.php" -a -exec chmod 664 {} \; \) # find . \( -name "*.tpl" -a -exec chmod 664 {} \; \) # find . \( -type d -a -exec chmod 775 {} \; \) -o \( -name "*.php" -a -exec chmod 664 {} \; \) See also CVS/FAQ
|
By failing to prepare, you are preparing to fail. |