Subversion: Difference between revisions
From charlesreid1
| Line 35: | Line 35: | ||
= SVN Server = | = SVN Server = | ||
Some syntax: | |||
Subversion is run as a server or as a client. Users (clients) check out files from a server. | |||
== SVN | A subversion server can have many different repositories, or it can have just one. | ||
The following guide covers how to set up a subversion server, and how to create new repositories in the server. | |||
==Setting up a new SVN server== | |||
{{Stub|section}} | |||
==Creating a new repository == | |||
Step 1: crate a place for the subversion repository | |||
<source lang="bash"> | |||
$ svnadmin create /path/to/repositories/repository_name | |||
</source> | |||
Step 2: import files into the repository: | |||
<source lang="bash"> | |||
$ svn import /location/of/files file:///path/to/repositories/repository_name -m "Initial import" | |||
</source> | |||
(You must use <code>file:///path/</code> syntax, rather than an absolute path). | |||
Step 3: check out code from the new repository | |||
<source lang="bash"> | |||
$ svn checkout svn://hostname/repository_name working_copy --username=user | |||
</source> | |||
Revision as of 20:55, 20 May 2011
Installation
Configuration
I configured subversion version 1.5.2 with the following configure line:
#!/bin/sh
#
# run this configure script
# make
# make install
./configure \
--prefix=/path/to/subversion \
--with-ssl \
--without-berkeley-db \
--enable-swig-bindings=no \
--with-apxs=/path/to/apache/bin/apxs \
--with-neon=/usr/local \
--with-apr=/path/to/apache \
--with-apr-util=/path/to/apache
I have to point subversion to apache so that it can handle subversion repository addresses that begin with http:// or https:// (as opposed to the default svn://, which works fine out of the box).
Dependencies
To install subversion with the above configure line, I had to install Apache, and I also had to install Neon, which is an HTTP and WebDAV client software. It is required for the http:// and https:// repository addresses. It's available from http://www.webdav.org/neon/. I install it to /usr/local/, and without any particularly special configure line (just ./configure).
SVN Guide
SVN Server
Some syntax:
Subversion is run as a server or as a client. Users (clients) check out files from a server.
A subversion server can have many different repositories, or it can have just one.
The following guide covers how to set up a subversion server, and how to create new repositories in the server.
Setting up a new SVN server
Creating a new repository
Step 1: crate a place for the subversion repository
$ svnadmin create /path/to/repositories/repository_name
Step 2: import files into the repository:
$ svn import /location/of/files file:///path/to/repositories/repository_name -m "Initial import"
(You must use file:///path/ syntax, rather than an absolute path).
Step 3: check out code from the new repository
$ svn checkout svn://hostname/repository_name working_copy --username=user