开发者

How to create a subversion repository with standard layout?

开发者 https://www.devze.com 2023-01-19 03:49 出处:网络
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)?

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开发者_如何转开发?


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


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消