1 / 27

CVS for Project management

CVS for Project management. 김기형 kkhsoft@sparcs.org. What is CVS?. CVS : the Concurrent Version System 각종 파일의 버전을 쉽게 관리할 수 있도록 도와주는 도구 매 단계마다 파일관리 백업 & 버그 수정 용이 공동 프로젝트 에서 파일 관리 여럿이서 공동 작업 가능. 동작 방식. 저장소 (Repository) 작업 파일들이 보관되는 공간 Directory managed by CVS Start a Project.

nitsa
Télécharger la présentation

CVS for Project management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CVS for Project management 김기형 kkhsoft@sparcs.org kkhsoft@sparcs.org

  2. What is CVS? • CVS : the Concurrent Version System • 각종 파일의 버전을 쉽게 관리할 수 있도록 도와주는 도구 • 매 단계마다 파일관리 • 백업 & 버그 수정 용이 • 공동 프로젝트 에서 파일 관리 • 여럿이서 공동 작업 가능 kkhsoft@sparcs.org

  3. 동작 방식 • 저장소 (Repository) • 작업 파일들이 보관되는 공간 • Directory managed by CVS • Start a Project checkout 저장소 개발자 개발자 kkhsoft@sparcs.org

  4. 동작방식 요약 • 저장소 초기화 • CVS 설치시 1번. • 프로젝트 초기화 • 새로운 프로젝트 시작시 필요 • 작업 공간 마련 • 작업 • 작업 내용을 저장소를 통해서 교류 kkhsoft@sparcs.org

  5. 저장소 설정 • $ cvs –d /home/cvs init • ‘init’은 cvs 명령어 • /home/cvs/CVSROOT • Cvs의 각종 설정 내용 • /home/cvs 를 직접 건드리지 말것! • Cvs 명령어 이용! • .bash_profile ( 저장소 위치 지정 ) • CVSROOT=/home/cvs • export CVSROOT kkhsoft@sparcs.org

  6. System 계정 이용 • 그룹 생성 후 개발자들을 추가 • Groupadd로 그룹 생성 • /etc/group 파일에서 사용자 등록 • Directory에 권한 부여 • $ chgrp –R cvs /home/kkhsoft/cvs • $ chmod –R g+w /home/kkhsoft/cvs kkhsoft@sparcs.org

  7. System 계정 없이 이용 • System 계정 없이 이용하는 방법 • CVS 암호 인증 방식 이용 • 개발자들은 CVS계정을 부여 받으며 inetd를 통해 정해진 포트로 CVS를 사용 • 시스템 관리 측면에서 유리 • 공개 프로젝트에서 주로 사용 • 아파치, 모질라 등 kkhsoft@sparcs.org

  8. inetd 설정 • /etc/services • cvspserver 2401/tcp • cvspserver 2401/udp • /etc/inetd.conf • cvspserver stream tcp nowait root /usr/bin/cvs cvs -f --allow-root=/home/cvs pserver • $ killall -HUP inetd • Inetd 재시작 kkhsoft@sparcs.org

  9. 개발자 관리 • $ htpasswd -n test • ID:encrypt_passwd • test:f9HKoh.qN/Dz2 • Passwd file 위치 • /home/cvs/CVSROOT/passwd • ID:encrypt_passwd:REAL_ACCOUNT • test:f9HKoh.qN/Dz2:cvs kkhsoft@sparcs.org

  10. Readers, Writers • /home/cvs/CVSROOT/ • readers : 읽기 권한만 가진 개발자 • writers : 읽기 & 쓰기 권한 모두 가진 개발자 • Just add user ID in reader or writer file. kkhsoft@sparcs.org

  11. 프로젝트 초기화 • Directory 구조 설계 • 해당 소스가 있는 Directory 로 이동 후 소스들을 CVS로 보낸다. • $ cvs import –m "myprj" khpro kkhsoft start • N khpro/hello.c • No conflicts created by this import kkhsoft@sparcs.org

  12. Start a Project • System에 계정 있을 경우 • $ cvs -d /home/cvs 명령 • System에 계정 없을 경우 • $ cvs -d :pserver:test@mir.sparcs.net: /home/cvs login • $ cvs -d :pserver:test@mir.sparcs.net: /home/cvs 명령 kkhsoft@sparcs.org

  13. Checkout • Checkout • $ cvs checkout khpro • cvs checkout: Updating khpro • U khpro/hello.c kkhsoft@sparcs.org

  14. Commit • 파일 수정 후 업로드 하기 • $ cvs commit –m “adding maker” hello.c kkhsoft@sparcs.org

  15. M modify Update • 저장소에서 다른 사람의 작업 결과를 받는 일 • $ cvs update • cvs update: Updating . • “M 파일명”: 수정된 파일 • “U 파일명”: 갱신된 파일 chekout chekout me 저장소 others update commit kkhsoft@sparcs.org

  16. C modify Conflicts • 개발자들 간에 update 하고 commit 하는 시간차이가 있어 변경된 내용이 서로 일치하지 않으면 commit 할때 충돌 (conflict) 이 일어난다. • 충돌이 일어나면 해당 파일을 편집기로 열어 >>>>>>>> 부터 <<<<<<<< 사이의 충돌나는 부분을 편집한 후 다시 commit 을 시도 하면 된다. chekout chekout me 저장소 others update commit kkhsoft@sparcs.org

  17. Example kkhsoft@sparcs.org

  18. Add file • $ cvs add read.txt • “read.txt”를 추가한다는 것을 기록 • 실제로 저장하려면 “commit”이용 kkhsoft@sparcs.org

  19. Delete file • $ cvs delete read.txt • “read.txt”를 삭제한다는 것을 기록 • 실제로 삭제하려면 “commit”이용 kkhsoft@sparcs.org

  20. log • 작업 기록 확인 • $ cvs log 파일명 kkhsoft@sparcs.org

  21. Tag #1 • 프로그램이 2개 이상의 소스를 가지고 있을 때 한 시점에서 소스들을 묶어 둘 수 있다. • cvs tag는 현재 작업 Directory와 서브 Directory 에 있는 모든 파일들에 tag를 붙인다. • cvs tag 태그명 파일명 • cvs tag 태그명 • 현재 작업 Directory에 있는 모든 파일에 태그를 붙인다 kkhsoft@sparcs.org

  22. Tag #2 • cvs checkout -r 태그명 module명 • Directory를 새로 만든다. • cvs update -r 태그명 • 작업중인 Directory에서 checkout이나 update를 하게되면 tag가 있는 버전이 작업 Directory에 있는 파일들을 덮어 쓰게 된다. kkhsoft@sparcs.org

  23. Branching #1 • 현재 코드를 변경하지 않고 옛 버전의 코드에 있는 버그를 수정. • 가지를 사용하면 메인 모듈에 영향을 주지 않고 메인 모듈의 다양한 버전을 저장하고 가져올 수 있다. • 가지 만들기 • cvs tag -b branchtag명 • 가지 가져오기 • cvs checkout -r branchtag명 module명 • cvs update -r branchtag명 kkhsoft@sparcs.org

  24. Branching #2 • Branch를 main과 합치기 • cvs checkout module명 • cvs update -j branchtag명 kkhsoft@sparcs.org

  25. Make Patch • CVS로 관리하는 코드에 대해서 특정 버전을 기준으로 한 패치를 작성한다. • cvs -z3 diff -u > file.diff • 이 파일을 CVS를 사용하지 않는 다른 사람들에게 전달하여 그들의 소스 코드를 패치하도록 할 수 있다. kkhsoft@sparcs.org

  26. Subversion • 커밋 단위가 파일이 아니라 체인지셋. • 파일별 리비전이 없고 한번 커밋할 때마다 변경 사항별로 리비전이 하나씩 증가 • CVS에 비해 엄청나게 빠른 업데이트/브랜칭/태깅 시간 • CVS와 거의 동일한 사용법 • 파일 이름변경, 이동, 디렉토리 버전 관리도 지원 • 여러개의 파일을 커밋하다 커밋이 실패하면 모두 이전 상태로 되돌아감 kkhsoft@sparcs.org

  27. The End 부족한 부분 많은데 끝까지 봐 주셔서 감사합니다^^ kkhsoft@sparcs.org

More Related