Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 /?

share|improve this question

1 Answer 1

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"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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