SensacionRC
SensacionRC

Reputation: 615

Error creating SVN Repository in Linux

I´m creating a svn repository in my Linux server and this are the commands I´m using:

  1. I´m in /home/myuser folder
  2. I create a folder: mkdir repository_folder
  3. Then I go to that folder: cd repository_folder
  4. Then I create the repository: svnadmin create test
  5. From this point I have some questions, because I don´t see the trunk,tags and branches folders and the folder structure is:
    • conf
    • db
    • format
    • hooks
    • locks
    • README.txt
  6. If I try inside the repository folder: svn mkdir trunk , it returns me an error: "svn: '.' is not a working copy"
  7. If I want to import a project from /home/myuser/myproject to /home/myuser/repository_folder/test/trunk , the command should be: svn import /home/myuser/myproject file:///home/myuser/repository_folder/test/trunk -m "some message" ??

What am I doing wrong when creating the repository?

Upvotes: 0

Views: 309

Answers (1)

bahrep
bahrep

Reputation: 30662

It seems to me that you are confusing Subversion working copy with a repository. It is expected to see those conf, db, format, hooks etc directories and files on file system.

If you want to create /trunk /branches and /tags directories in the repository, use the command svn mkdir file:///home/myuser/repository_folder/test/trunk file:///home/myuser/repository_folder/test/branches file:///home/myuser/repository_folder/test/tags -m "Initial repository structure". BTW, make sure that the path to the repository is valid.

Otherwise, you can svn checkout the working copy of the repository using svn checkout file:///home/myuser/repository_folder/test/. Then create the necessary structure, svn add the new directories and svn commit them to the repository.

Read SVNBook!

Upvotes: 2

Related Questions