重命名目录,现在 SVN 不允许我提交

Renamed directory, now SVN not allowing me to commit

我有一个名为 old dir 的目录(一个 Maven 项目)。

我通过在 Tortoisesvn 中执行 svn 重命名将名称更改为新目录。

如果你执行 svn status,我看到它在新目录上完成了 SVN 添加,在旧目录上完成了 svn 删除。在 Tortoisesvn 下提交时,目录及其内容被列为已添加或已删除,因此看起来 'sides' 都被提交了。但是,提交会出现此错误。

svn: Commit failed (details follow):
svn: Cannot commit 'path\to\new dir' because it was moved from 'path\to\old dir' which is not part of the commit; both sides of the move must be committed together

相关问题: Renamed file, now SVN not allowing me to commit?

由于该目录是一个maven项目,所以新目录中有未版本控制的文件。 mvn clean 在新目录上意味着新旧目录匹配,因此允许 svn 提交。

错误消息已经给出了解决方案:你应该同时提交两边的动作。 IE。原始位置和新位置或它们的共同父级。