Dustin Cook
Dustin Cook

Reputation: 1305

SVN Defining the Root Directory

I have installed subversion on Ubuntu 14.04 LTS. I have created a repository under /home/svnadmin/svn/repo-one. I can then use ToroiseSVN to connect and view by using the full path - /home/svnadmin/svn/repo-one.

I would like to make it so that /home/svnadmin/svn is the root directory for svnserve to use. I have consulted the svnserve --help manual and found this:

-r [--root] ARG: root of directory to serve

But when I attempt to run the command:

svnserve -r /home/svnadmin/svn/

When I execute that command I get the error:

You must specify exactly one of -d, -i, -t or -X.

Can anyone help me please? Have I misunderstood what the -r command is supposed to do? I've tried searching for the answer and can't find a solution to my problem anywhere.

Upvotes: 1

Views: 732

Answers (1)

Rup
Rup

Reputation: 34408

These flags select which model the process uses to listen for connections:

  • -d - run as a standalone daemon, listening on a port itself
  • -i - run as an xinetd backend, communicating with a parent process on stdin and stdout
  • -t - in SSH tunnel mode
  • -X - in debug listen mode, accepting a single connection then stopping.

Documentation here. So you do need to select one: from discussion in the comments it sounds like you want -i for xinetd mode, and there's a sample xinetd configuration for this in the documentation too:

svn stream tcp nowait svnadmin /usr/bin/svnserve svnserve -i -r /home/svnadmin/svn/

assuming you have svn 3690/tcp in /etc/services to define the port, which you almost certainly do on a modern distro.

Upvotes: 3

Related Questions