I did this on Mac OS 10.5. It comes with both svn
and svnserve
installed. Should probably work for prior OSs as well.
- Create a regular user (no admin privileges), I suggest you call it svn.
- Open a terminal window and log in as this user:
su svn
- Create a new directory and call it repositories, or something else of your choice, under the home directory (which is probably):
mkdir
/Users/svn
/repositories
- Set up a subversion repository for a new project, name it for example project1:
svnadmin create /Users/svn/repositories/project1
- Change into the project1/conf subdirectory and edit svnserve.conf according to your needs. The minimalist changes will probably be something like uncommenting/changing the following lines:
[general]
anon-acccess=none
auth-access=write - If others need access, who are not users of the system or you want to use a different username for yourself also uncomment:
password-db=passwd - Then also edit the passwd file in the same project1/conf subdirectory.
- If you want to adhere to the tradition create trunk, branch, tags subfolders under project1. If you prefer to make up your own directory names and structure feel free to do so.
- Start the server as a demon with:
svnserve -d -r /Users/svn/repositories
(default port is 3690) - Connect remotely from another machine and add some new, not yet versioned material ((this command is all on one line):
svn import /path/to/mylocal_project_folder svn://[hostname_or_IP]/project1/trunk
If the environment variable is not set and you receive an error to set your editor:
export SVN_EDITOR=vi (or emacs or...)
- Now check what you uploaded:
svn list svn://[hostname_or_IP]/project1/trunk
To stop the server for any reason:
ps ux | grep svnserve
The second number is the process number
kill [that number]
The complete svn documentation: http://svnbook.red-bean.com/
No TweetBacks yet. (Be the first to Tweet this post)
Thanks for posting this Mac friendly download tutorial- there are a ton for Windows subversion downloads, but the ones that are for Mac are hard to understand. This was great!