Admin관리자   |    Posting포스트   |    LogOut로그아웃
:+:하늘을닮은호수:+: | Trac | 블로그   |    위치로그   |    태그로그   |    방명록


:+:하늘을 닮은 호수:+:
http://sunsson.iptime.org
Category
전체 (944)
[Standard] (58)
[OS] (116)
[Develope] (74)
[IT Trend] (347)
[Music] (93)
[삶의 질] (255)
Tag List
trac   3GPP   IPTV   svn   2MB   c99   PSS   RTP   VoIP   H.263   네 멋대로 해라   양동근   이나영   손예진   memory_leak   팔봉산   FLV   ffmpeg   cdn   grep   이명박   aio   beryl   awk   iLBC   강태우   gnuplot   avc   AutoConf   끝이아니길  
«   2008/08   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
svn 사용법
Date : 2005/11/03 10:10

출처 : 회사 동료분의 강의 text

계정은 ###으로 수정하였고, svn의 server address는 svn://address로 수정 표기하였다.


1. 디렉토리 확인하기
1.1
###@ubuntu:~ $ svn list svn://address/test
branches/
tags/
trunk/

3개의 디렉토리가 있는것을 확인 할 수 있다.

1.2
###@ubuntu:~ $ svn list svn://address/juliet
###@ubuntu:~ $
아직 juliet용으로는 디렉토리를 만든것이 없다는 것을 확인할 수 있다.

2. 디렉토리 만들기
2.1
###@ubuntu:~ $ svn mkdir svn://address/test/Documents


--This line, and those below, will be ignored--

A svn://address/test/Documents
이런 화면을 보게된다.

새로 만든 디렉토리에 대한 설명을 적은후에 저장하고 나가면
"svn-commit.tmp" 4L, 123C written

Committed revision 16.
이렇게 나온다. 성공적으로 만들었다는 의미다.

2.2
확인해 보자 만들어졌다.
###@ubuntu:~ $ svn list svn://address/test/
Documents/
branches/
tags/
trunk/

3. 프로젝트 시작(만들어진 소스 리스트 올리기)
3.1
###@ubuntu:~ $ mkdir sampleprj

3.2
###@ubuntu:~ $ cd sampleprj/

3.3
###@ubuntu:~/sampleprj $ vi test.c
#include

int main()
{
printf("Hello SVNn");
return 0;
}

3.4
###@ubuntu:~/sampleprj $ vi Makefile
TARGET=test

all: $(TARGET)

$(TARGET): test.o
gcc -o $(TARGET) test.o

test.o:
gcc -c test.c

3.5
###@ubuntu:~/sampleprj $ make
gcc -c test.c
gcc -o test test.o

3.6
이제 프로젝트를 올려본다.
###@ubuntu:~/sampleprj $ cd ..
###@ubuntu:~ $ svn import sampleprj svn://address/test/trunk
테스트용으로 Sample Project를 만들어 올렸음

--This line, and those below, will be ignored--

A sampleprj


Adding (bin) sampleprj/test
Adding sampleprj/test.c
Adding sampleprj/Makefile

Committed revision 17.

3.7
확인해본다
###@ubuntu:~ $ svn list svn://address/test
Documents/
branches/
tags/
trunk/
###@ubuntu:~ $ svn list svn://address/test/trunk
Makefile
test
test.c

3.8
다 올렸으니 지운다
###@ubuntu:~ $ rm -rf sampleprj/

4
sample이라는 디렉토리에 test/trunk의 프로젝트를 받아온다
###@ubuntu:~ $ svn co svn://address/test/trunk sample
A sample/test
A sample/test.c
A sample/Makefile
Checked out revision 17.

5
###@ubuntu:~ $ cd sample/
###@ubuntu:~/sample $ ls
Makefile test test.c
###@ubuntu:~/sample $ svn update
At revision 17.

update가 있으면 받아온다. 없으니까 그냥 아직 revision 17이라고 적혀있다.

6
test.c를 수정한다.
#include

int main()
{
printf("Hello SVNn");
printf("Merong!!n");
return 0;
}

7.
고친내용과 서버의 내용을 비교해본다.
###@ubuntu:~/sample $ svn diff
Index: test.c
===================================================================
--- test.c (revision 17)
+++ test.c (working copy)
@@ -3,5 +3,6 @@
int main()
{
printf("Hello SVNn");
+ printf("Merong!!n");
return 0;
}

8.
고친내용을 서버에 올린다
###@ubuntu:~/sample $ svn commit
test.c 파일에 printf 문장을 한줄 추가했음
--This line, and those below, will be ignored--

M test.c

test.c라는 파일 하나 바꿨다고 아랫쪽에 적혀있다..

8.1
저장하고 나오면
"svn-commit.tmp" 4L, 103C written
Sending test.c
Transmitting file data .
Committed revision 18.
이렇게 나온다. test.c 수정된 내용을 서버로 올렸다. 이제 revision은 18이다.

9
test.c 파일의 히스토리를 살펴본다
###@ubuntu:~/sample $ svn log test.c
------------------------------------------------------------------------
r18 | ### | 2005-03-24 12:10:19 +0900 (Thu, 24 Mar 2005) | 2 lines

test.c 파일에 printf 문장을 한줄 추가했음

------------------------------------------------------------------------
r17 | ### | 2005-03-24 12:02:25 +0900 (Thu, 24 Mar 2005) | 2 lines

테스트용으로 Sample Project를 만들어 올렸음

------------------------------------------------------------------------


10.
test2.c를 추가해본다
###@ubuntu:~/sample $ vi test2.c
int test()
{
printf("test ftnn");
}

###@ubuntu:~/sample $ svn add test2.c
A test2.c

###@ubuntu:~/sample $ svn list
Makefile
test
test.c
아직 test2.c는 안올라갔다. (commit을 해야 올라간다)

###@ubuntu:~/sample $ svn commit
test2.c라는 파일 추가
--This line, and those below, will be ignored--

A test2.c

"svn-commit.tmp" 4L, 84C written
Adding test2.c
Transmitting file data .
Committed revision 19.
###@ubuntu:~/sample $ svn list
Makefile
test
test.c
test2.c

이제 추가되었다.


11
test라는 바이너리가 올라가있는게 맘에 안든다. 지워야겠다.
###@ubuntu:~/sample $ svn del test
D test
###@ubuntu:~/sample $ svn list
Makefile
test
test.c
test2.c


아직 남아있다 commit한다.
###@ubuntu:~/sample $ svn commit
실행바이너리라 지움
--This line, and those below, will be ignored--

D test
"svn-commit.tmp" 4L, 79C written
Deleting test

Committed revision 20.
###@ubuntu:~/sample $ svn list
Makefile
test.c
test2.c

지워졌다.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기
2005/11/03 10:10 2005/11/03 10:10

블로그코리아에 블UP하기
Tag
Top
트랙백 주소 : 이 글에는 트랙백을 보낼 수 없습니다
은댈
2008/02/11 21:16
덧글 주소 | 덧글 쓰기 | 수정/삭제
진짜 자세하네요~ 우우우~ㅋ
[로그인][오픈아이디란?]
    
◀ 이전 페이지  |  1 |  ... 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 |  ... 944 |  다음 페이지 ▶
Creative Commons License
블로그 내에 모든 저작물은 크리에이티브 커먼즈코리아 저작자표시 - 비영리 - 변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
website stats 믹시 블로그코리아에 블UP하기

Google

블로그 검색
최근 덧글
펼치기
최근 트랙백
펼치기
Today :
140
Yesterday :
198
Total :
62478
Powered by :
Textcube
ver :
1.6.3 : Tenuto
skin by :