Version Control with SVN

1. Create trunk from proj_src(source code) :
[codesyntax lang=”bash”]

$ mv /root/proj_src /home/projects/
$ cd /home/projects/
$ svn import proj_src svn://192.168.1.119/proj/trunk -m "create proj trunk"

[/codesyntax]

2. To checkout the project :
[codesyntax lang=”bash”]

$ svn co svn://192.168.1.119/proj

[/codesyntax]

3. Add tags and first release :
[codesyntax lang=”bash”]

$ cd /home/projects/proj/
$ svn mkdir tags
$ svn cp trunk tags/release_0.1.0

[/codesyntax]

4. Generate working copies for developers, special offer or someone else :
[codesyntax lang=”bash”]

$ svn mkdir branches
$ svn cp tags/release_0.1.0 branches/kim
$ svn cp tags/release_0.1.0 branches/cat
$ svn cp tags/release_0.1.0 branches/special-x

[/codesyntax]

5. When finished :
[codesyntax lang=”bash”]

$ svn ci -m "everything is ready"

[/codesyntax]

6. Delete ?
[codesyntax lang=”bash”]

$ svn delete svn://192.168.1.119/branches/special-x -m "delete branch"

[/codesyntax]

7. Merge revisions of branches into trunk
[codesyntax lang=”bash”]

$ svn merge -r 50:100 svn://192.168.1.119/vtigercrm/branches/kim ./trunk/
$ svn ci -m "merge 50-100 from branches/kim to trunk"

[/codesyntax]

8. Revert merge
[codesyntax lang=”bash”]

$ cd trunk/
$ svn log
$ svn merge -r 101:50 .
$ svn ci -m "revert merge 100-50 from trunk"

[/codesyntax]

Posted in SVN | Tagged | Leave a comment