On Ubuntu
$ sudo apt-get install subversion
Working directory
~/Desktop/TEST
Create a repository
$ svnadmin create svnroot
- creates a directory called svnroot
$ ll svnroot
drwxr-xr-x 2 localuser localuser 4096 2010-05-06 16:22 conf
drwxr-sr-x 6 localuser localuser 4096 2010-05-06 16:22 db
-r--r--r-- 1 localuser localuser 2 2010-05-06 16:22 format
drwxr-xr-x 2 localuser localuser 4096 2010-05-06 16:22 hooks
drwxr-xr-x 2 localuser localuser 4096 2010-05-06 16:22 locks
Files of interest
$ cat conf/passwd
[users]
harry = harryspassword
dolly = dollyspassword
$ cat conf/svnserve.conf
[general]
## restrict access to read, write and none
harry = write
## password-db is the location of the /path/to/passwd file
password-db = passwd
Now create another svn root, this is not req, but same as above
$ svnadmin create projectx
$ mkdir gsv gsv/trunk gsv/branches gsv/tags
$ cd gsv
$ svn import . file:///home/krevanna/Desktop/TEST/SVN/projectx -m 'initial repository structure'
$ cd ..
There are several ways to checkout svn
- using file://
- this will create the folder called trunk if no name is specified in the end.
$ svn checkout file:///home/krevanna/Desktop/TEST/SVN/projectx/trunk .
- using svn ://
This is to access within the same server
It depends upon the projects involved. If the projects are related, and are likely to share data, then it's best to create one repository with several subdirectories like this:
$ svnadmin create /repo/svn $ svn mkdir file:///repo/svn/projA $ svn mkdir file:///repo/svn/projB $ svn mkdir file:///repo/svn/projCIf the projects are completely unrelated, and not likely to share data between them, then it's probably best to create separate and unrelated repositories.
$ mkdir /repo/svn $ svnadmin create /repo/svn/projA $ svnadmin create /repo/svn/projB $ svnadmin create /repo/svn/projC
Reference:
http://wiki.site5.com/SVN/Subversion_%28SVN%29_Setup_Guide
https://help.ubuntu.com/community/Subversion
https://help.ubuntu.com/community/Subversion
No comments:
Post a Comment