我有一个正常的 SVN 结构:
http://server/DEV/Project/trunk
http://server/DEV/Project/branches
然后我使用以下命令分支:
svn copy -m "message" "http://server/DEV/Project/trunk@123" "http://server/DEV/Project/branches/rel123"
一切正常,内容/trunk@123
放在新的分支路径下/branches/rel123
。都好。
添加:/DEV/Project/branches/rel123(从路径复制:/DEV/Project/trunk,修订版,123)
问题:
如果有人不小心再次执行了分支,我预计它会失败并显示"svn: E160020: Path 'rel123' already exists"。然而它并没有失败。
重复相同的svn copy
命令实际上将复制/trunk
到/branches/rel123/trunk
添加:/DEV/Project/branches/rel123/trunk(从路径复制:/DEV/Project/trunk,修订版,123)
所以现在,我最终得到/branches/rel123
了包含主干外的所有文件,以及额外的文件夹“主干”(/branches/rel123/trunk
),其中也包含主干外的所有相同文件。
我试过了:
我尝试终止路径以强制 SVN 理解这是绝对目录名称,但没有运气(我http://server
在下面的示例中删除了部分)
svn copy -m "message" "/DEV/Project/trunk@123/" "/DEV/Project/branches/rel123"
svn copy -m "message" "/DEV/Project/trunk/@123" "/DEV/Project/branches/rel123"
svn copy -m "message" "/DEV/Project/trunk@123" "/DEV/Project/branches/rel123/"
svn copy -m "message" "/DEV/Project/trunk@123/" "/DEV/Project/branches/rel123/"
svn copy -m "message" "/DEV/Project/trunk/@123" "/DEV/Project/branches/rel123/"
Anyone experiencing this? Is this a known issue? Any workarounds to prevent this "branch inside a branch" mistake?