r3 - 22 Dec 2011 - 07:09:50 - GunmoRyuYou are here: KoreaCmsWiki >  UOS Web > QuickHowtoCVS

CVS Quick HOWTO

코드는 짰으나 CVS 사용에 애를 먹는 이들을 위하여 간단한 하우투를 써 봄.

CMSSW 환경에서의 CVS 접근

자신이 만든 코드 혹은 변경한 코드는 공통의 저장소인 CVS에 꼭 자신의 이름으로 올리도록(체크인하도록) 해야 한다. 따라서 CMSSW로 무슨 일을 하기 전에는 반드시 자신의 계정으로 로그인을 해 놓은 상태를 만들어 놓도록 하자. (사실 로그인은 아니고 kerberos ticket 을 발급받는 일이다. 티켓 한장으로 여러가지 신원확인이 가능하다.)

[dd] /home/garam/dqm/CMSSW_2_0_0/src/VisMonitoring/DQMServer/python > kinit
Password for garam@CERN.CH:
[dd] /home/garam/dqm/CMSSW_2_0_0/src/VisMonitoring/DQMServer/python > klist
Ticket cache: FILE:/tmp/krb5cc_27790
Default principal: garam@CERN.CH

Valid starting     Expires            Service principal
07/04/08 14:18:51  07/05/08 14:18:42  krbtgt/CERN.CH@CERN.CH
        renew until 07/09/08 14:18:42
07/04/08 14:18:58  07/05/08 14:18:42  krbtgt/CERN.CH@CERN.CH
        renew until 07/09/08 14:18:42
07/04/08 14:18:58  07/05/08 14:18:42  afs@CERN.CH
        renew until 07/09/08 14:18:42


Kerberos 4 ticket cache: /tmp/tkt27790
Principal: garam@CERN.CH

  Issued              Expires             Principal
07/04/08 12:52:21  07/05/08 14:18:42  krbtgt.CERN.CH@CERN.CH
[dd] /home/garam/dqm/CMSSW_2_0_0/src/VisMonitoring/DQMServer/python >

CVS를 통하여 소스코드를 다루기 위해서는 CVS관련 설정이 알맞게 셋업 되어 있어야 한다. 아래의 명령으로 확인하자.

[dd] /home/garam/dqm/CMSSW_2_0_0/src/VisMonitoring/DQMServer/python > env | grep cvs
CVSROOT=:kserver:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
[dd] /home/garam/dqm/CMSSW_2_0_0/src/VisMonitoring/DQMServer/python >

kserver 라는 스트링이 보이면 ok.

암기용 cvs 어휘들

열심히 쓰지 않겠다. 사용법이니 자신의 상황에 맞게 잘 적용하여 사용해 주기 바란다.

신규파일 추가

  • cvs add garams_module/module_no1/file1.cc

체크아웃

  • cvs co garams_module/module_no1
    • garams_module/module_no1을 최근 버전으로 체크아웃 하여 받아온다.

  • cvs co -r garams_module_version garams_module_no1
    • garams_module/module_no1을 목표한 버전으로 체크아웃 하여 받아온다.

체크아웃 후 변경내용 관찰

  • cvs diff garams_module/module_no1/file1.cc

과거 기록 살피기

  • cvs log garams_module/module_no1/file1.cc

업데이트

  • cvs -q update -d
    • 현 디렉토리 전부 업데이트

  • cvs -q update garams_module/module_no1/file1.cc
    • 파일 업데이트

커밋!

  • cvs commit garams_module/module_no1/file1.cc -m "파일 추가의 이유"

로그 내용 맘에 안들때 바꾸기

  • cvs admin -m1.1:"아까 실수로 로그내용 비워둠" garams_module/module_no1/file1.cc
    • cvs에 어드민 권한이 없으면 안될수도 있음. 관리자에게 요청해서 받아도 좋고 안받아도 좋음.

-- GaramHahn - 04 Jul 2008

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
UOS.QuickHowtoCVS moved from UOS.QuickHowtoCVS on 22 Dec 2011 - 07:09 by GunmoRyu - put it back
 
KOREA-CMS
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding KoreaCmsWiki? Send feedback