开发者

How to svn mkdir ../dir if .. is not a working copy?

I 开发者_StackOverflowdont want to checkout the whole directory hierarchy.


Most SVN commands take a remote URL, so if you repository is at http://myserver/svn/myrepo, you could do something like:

svn mkdir http://myserver/svn/myrepo/mydir
svn checkout http://myserver/svn/myrepo/mydir


You cannot add a source code controlled directory to a non-source code controlled directory.

This is a design choice because eventually people who tried multiple-root source code control wanted to coordinate the roots, which meant a unified directory structure (removing the multiple roots). It is not that SVN can't help you do what you want to accomplish, it's that you're approaching your task the wrong way.

There are two ways to do this, depending on what you want to accomplish. If you really want a second independent root, then it's a different project. Create a different repository for it. You might have to run "svnadmin create", or get an administrator to do so.

If you just want to avoid a full checkout to work on some portion, then use the "-N" or --non-recursive option to checkout just the directory you want (without checking out the entire tree). It might take some practice to get used to referring to just one part of the tree, but once you learn it you'll never need to learn it again.

Note that you'll still have to add your directory and commit it back for the SVN server to have a copy, but other than that, you'll only have a small branch of the entire tree on your disk.


commit empty ..

then svn mkdir

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜