20

How can I use svn command line or svnadmin to create the recommended directory structure trunk etc. I did mkdir but nothing shows up? how do I create these directories?

Not able to connect using tools, so just want to create these basic directories first.

So let me know how to use command line or help with this: SVNAdmin Create Repository URL not working

Community
  • 1
  • 1
NextDroid
  • 337
  • 2
  • 4
  • 10
  • 1
    possible duplicate of [SVN creating trunk directory on existing repository](http://stackoverflow.com/questions/345683/svn-creating-trunk-directory-on-existing-repository). Please do yourself a favor and read the [SVN book](http://svnbook.red-bean.com), especially the basics chapters, and search here first before posting new questions to avoid duplication. Thanks. [This question](http://stackoverflow.com/q/3067217/62576) may also be helpful. – Ken White Nov 16 '12 at 00:33

1 Answers1

31

Did you read the Subversion manual? This is one of the best open source instruction manuals in the world. Go through the first few chapters and try the examples. Heck, they show you exactly how to do what you want.

You are talking about two separate structures: The repository directory that may be on a completely different machine, and the working directory where you've checked out your work.

You need to create a repository. Once you do that, you can use the svn mkdir command to either make your directory structure without a working directory:

$ svn mkdir --parents -m" Creating basic directory structure" \
    svn://my_repo/trunk svn://my_repo/branches svn://my_repo/tags

Or, you can checkout a copy of the repository in into a working directory and do everything from there:

C> svn co svn://my_repo workingdir
C> cd workingdir
C> svn mkdir trunk tags branches
C> svn commit -m"Creating basic directory structure"

Notice that you will not see the directories directly inside your repository. However, you can use the svn ls command to see the structure:

C> svn ls -R svn://my_repo
Wilfred Hughes
  • 29,846
  • 15
  • 139
  • 192
David W.
  • 105,218
  • 39
  • 216
  • 337