1.切换资源库(svn sw --relocate)
svn sw --relocate [path]
例如:
svn sw --relocate http://svn.hoolai.com/sango3d-docs/hCmd http://svn.hulai.com/sango3d-docs/hCmd .
注意最后有个点 . 代表当前目录 其实可以不写 不写默认表示当前目录
这个意思就是说从http://svn.hoolai.com/sango3d-docs/hCmd这个资源库切换到http://svn.hulai.com/sango3d-docs/hCmd
注意这里有且只有可以切换资源库,而不是切换分支
什么是资源库呢?敲“svn info”看到“Repository Root”就是喇,用--relocate的时候就只能切换这段,要不然会提示错误的。
2.切换分支(svn sw)
svn sw svn sw https://mysvn.cn/svn/repo/project/branches/version-xxx
同上面例子类似,后面点省略了。这样就能来回切换分支。
但是这样有时候在某些软件checkout下来的working copy上会提示资源库不正确,解决办法如下:
照样是svn info看看信息,有时候“Repository Root”是这样的格式 “https://username@mysvn.cn/svn/repo”
这个时候有两种办法:
一是使用“svn sw https://username@mysvn.cn/svn/repo/project/branches/version-xxx”切换
二是先通过"svn sw --relocate https://username@mysvn.cn/svn/repo https://mysvn.cn/svn/repo“来切换资源库,然后再切换分支