I first created the /trunk on domain.name

svnadmin create /trunk
svnserve -d -r /trunk

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

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

Why my repository /trunk maps to /?

link|improve this question
feedback

1 Answer

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://domain.name/ 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://domain.name/trunk

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://domain.name/ myWorkingCopy
cd myWorkingCopy
mkdir trunk
cp /path/to/existing/codebase trunk/ 
svn add trunk
svn ci -m "First commit of trunk codebase"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.