Subversion URL | http://subversion.adminschool.net |
---|---|
기본디렉토리 | /data/vcs/svn |
아파치설정 | /etc/apache2/mods-available/dav_svn.conf |
계정정보 | /etc/apache2/dav_svn.passwd |
# htpasswd /etc/apache2/dav_svn.passwd starlits
# htpasswd /etc/apache2/dav_svn.passwd starlits
# svnadmin create /data/vcs/svn/beflyt
# cd /data/vcs/svn # chown -R www-data.www-data beflyt/
http://subversion.adminschool.net/svn/beflyt
# cd /data/vcs/svn # rm -rf beflyt
# cd /path/to/projectname # svn import -m "New Project" . svn://HostName/projectname/trunk or # svn import -m "New Project" . http://HostName/svn/projectname/trunk
# svn mkdir -m "Create tags directory" svn://HostName/projectname/tags or # svn mkdir -m "Create tags directory" http://HostName/svn/projectname/tags
# svn mkdir -m "Create branches directory" svn://HostName/projectname/branches or # svn mkdir -m "Create branches directory" http://HostName/svn/projectname/branches
$ svn co svn://subversion.adminschool.net/projectname/trunk projectname
$ svn co http://subversion.adminschool.net/svn/projectname/trunk projectname
$ svn --username=starlits co http://subversion.adminschool.net/svn/projectname/trunk projectname
$ svn update
$ svn commit
Checkout | Repository로부터 내용을 꺼내오는 작업 (co 라고 줄여쓸 수 있다.) |
---|---|
Commit | Checkout된 내용을 수정한 뒤에 다시 Repository로 보내는 작업 |
Update | Checkout 한 뒤로 다른 사람들이 commit한 내용을 추가적으로 checkout 하는 작업 |
$ svn add {filename|directory}
$svn diff --revision 4 sample.c Index: sample.c =================================================================== --- sample.c (revision 4) +++ sample.c (working copy) @@ -2,7 +2,8 @@ int main() { - printf("Sample Program Version 0.1\n"); + printf("Sample Program Version 0.2\n"); + printf("Hello Subversion\n"); return 0; }
-
-revision 4:5 (-r 4:5)로 하면 된다. -
-revision 8:10 도 가능하다. $ svn diff --revision 4:5 sample.c Index: sample.c =================================================================== --- sample.c (revision 4) +++ sample.c (revision 5) @@ -2,7 +2,8 @@ int main() { - printf("Sample Program Version 0.1\n"); + printf("Sample Program Version 0.2\n"); + printf("Hello Subversion\n"); return 0; }
$ svn log
$ svn diff
$ svn2cl
$ svn co http://svn.adminschool.net/svn/beflyt/trunk beflyt
$ svn co -r {20080101} http://svn.adminschool.net/svn/beflyt/trunk beflyt
$ svn co -r 3 http://svn.adminschool.net/svn/beflyt/trunk beflyt
svn status -u