Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I first created the /trunk on

svnadmin create /trunk
svnserve -d -r /trunk

Then I tried to connect to svn://,but it doesn't exists...

So I tried svn://,this time it works...

Why my repository /trunk maps to /?

share|improve this question

Your first command created a repository in the /trunk directory.
You have not created a 'trunk' directory inside a repository. You've created a repository in a directory called trunk.

Your second command then started an svn server to host this repository.
When you pass in -r /trunk to svnserve you're saying you want svn:// to point to the /trunk folder of the filesystem.

I'd suggest trying the following to create an empty repository and add a trunk directory to it:

mkdir /repository
svnadmin create /repository
svnserve -d -r /repository
svn mkdir -m "Making trunk directory." svn://

Alternatively, instead of the svn mkdir command, you could checkout the empty repository, add the required content and then check it back in. For example:

cd ~
svn co svn:// myWorkingCopy
cd myWorkingCopy
mkdir trunk
cp /path/to/existing/codebase trunk/ 
svn add trunk
svn ci -m "First commit of trunk codebase"
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .