重命名svn中的目录

  • 本文关键字:svn 重命名 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/C/hello.txt' is part of the commit
上例中重命名SVN文件夹的命令及其输出如下所示:#svn mv A ZA ZD A/B/C/hello.txtD A/B/CD A/BD A#lsA Z#rm-rf A#lsZ#svn stD AA+Z#svn-ci-m"提交消息。"删除源/A添加源/Z承诺修订307。#svn st#ls-R:Z./Z:B./Z/B:C./Z/B/C:hello.txt

要直接重命名服务器上的目录/文件夹,只需将svn mv与服务器URL一起使用,例如:

svn mv https://your-svn/old-name https://your-svn/new-name

在鱼壳中,您甚至可以将其缩短:

svn mv https://your-svn/{old-name,new-name}

最新更新