User Tools

Site Tools


svn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
svn [2016/05/21 17:52]
javapimp created
svn [2016/05/21 20:10]
javapimp
Line 1: Line 1:
 ====== SVN ====== ====== SVN ======
 ===== Create Server Repository ===== ===== Create Server Repository =====
 +
 +Once SVN is installed on the server execute the following.
  
 <code bash> <code bash>
 $ cd /​path/​to/​svn/​repos $ cd /​path/​to/​svn/​repos
-$ svnadmin create ​myrepository +$ svnadmin create ​repositoryname 
-<​code>​+</code> 
 + 
 +Change the owner of the repository directory and files. 
 + 
 +<code bash> 
 +$ chown -R www-data:​subversion repositoryname 
 +</​code>​ 
 + 
 +Initialize the repository with the basic directory structure. For this I use a shell script ''​svninit''​ that I created and put in ''/​usr/​bin''​ with the other SVN tools. 
 + 
 +<code bash> 
 +#​!/​bin/​bash 
 +url=http://​localhost/​svn 
 +svn mkdir $url/​$1/​trunk $url/​$1/​branches $url/​$1/​tags -m "New project $1" --parents 
 +</​code>​ 
 + 
 +Update the ''​url''​ to point to your SVN installation. 
 + 
 +Run the command like this: 
 + 
 +<code bash> 
 +$ svninit repositoryname 
 +</​code>​ 
 + 
 +On the client, check out the new repository. I use TortoiseSVN so I created the directory, right click and select "SVN Checkout..."​. Select the repository "​http://​host/​svn/​repositoryname"​.
  
svn.txt · Last modified: 2016/05/21 20:10 by javapimp