在svn中重命名目录
我的文件夹结构如下:在svn中重命名目录,svn,rename,Svn,Rename,我的文件夹结构如下: A/B/C/hello.txt 我使用svn mv将A重命名为Z: Z/B/C/hello.txt 然后我对hello.txt做了一些修改。现在,svn状态给出: D A/B/C/hello.txt A+ Z M+ Z/B/C/hello.txt 当我尝试提交时,会收到以下错误消息: 'Z/B/C' is not under version control and is not part of the commit, yet its child 'Z/B
A/B/C/hello.txt
我使用svn mv将A重命名为Z:
Z/B/C/hello.txt
然后我对hello.txt做了一些修改。现在,svn状态给出:
D A/B/C/hello.txt
A+ Z
M+ Z/B/C/hello.txt
当我尝试提交时,会收到以下错误消息:
'Z/B/C' is not under version control and is not part of the commit, yet its child 'Z/B/C/hello.txt' is part of the commit
上面示例中重命名SVN文件夹的命令及其输出如下所示:
#svn mv A Z
A Z
D A/B/C/hello.txt
D A/B/C
承兑交单
D A
#ls
A Z
#rm-rf A
#ls
Z
#svn街
D A
A+Z
#svn ci-m“提交消息”
删除源/A
添加源/Z
承诺修订307。
#svn街
#ls-R
.:
Z
/Z:
B
/Z/B:
C
/Z/B/C:
hello.txt
看到这个问题,公认的答案可能会有所帮助:尝试更改文件夹名称,提交更改,然后自行更改文件。这篇文章建议在进行重命名之前确保您完全处于最新状态,我就是这样做的。所以基本上,解决方案是在两个单独的提交中执行此操作,因为svn不会在单个提交中直接支持这些操作。这是正确的评估吗?如果是这样的话,我会把它作为答案并接受它。或者你可以在svn服务器上做,而不必签出。 Commands and their output to rename SVN folder in above example are shown below: # svn mv A Z A Z D A/B/C/hello.txt D A/B/C D A/B D A # ls A Z # rm -rf A #ls Z # svn st D A A + Z # svn ci -m "Commit message." Deleting source/A Adding source/Z Committed revision 307. # svn st # ls -R .: Z ./Z: B ./Z/B: C ./Z/B/C: hello.txt