tags:

views:

62

answers:

4

Is it possible to create a new SVN repository which is automatically structured by the SVN standard repository layout (trunk, branches, tags) via commandline (svnadmin create)?

Or do I always have to create thos directories manually?

+2  A: 

What I do is after creating the repository, I import a separate directory called SVNtmp that already has trunk/branches/tags in it. Don't know of anyway to automatically do this.

Josh W.
`svn import /path/to/some/skeleton/dir` is indeed the fastest way I know without have to create a checkout, copy the skeleton, and committing it
Wrikken
+2  A: 

Since it is only a suggested layout it doesn't do that out of the box. If you are using linux, here is a simple script I use for that:

#!/bin/bash
url=svn://somewhere
svn mkdir $url/$1/trunk $url/$1/branches $url/$1/tags -m "New project $1" --parents
Daff
Thank you and the other answerers. This solution might fit best for me.
PageFault
cooleo :-) i used to do the mkdir - but i didnt know i could do all three together in one command. Thanks! This is an effort-saver for a lazybone like me :-)
Critical Skill
+1  A: 

You have to remember that there are (at least) two standard layouts, the choice of which depends on what's most appropriate to your projects:

/
  /trunk
     /project1
     /project2
  /branches
  /tags

or

/
  /project1
    /trunk
    /branches
    /tags
  /project2
    /trunk
    /branches
    /tags

SVN is totally flexible about how you lay out the repository which is why it doesn't create a default layout.

the_mandrill
A: 

subversion edge has a similar feature built in. Also some additional administration features. You might want to give it a try.

Version Control Buddy