重命名文件,现在SVN不允许我提交? [英] Renamed file, now SVN not allowing me to commit?

查看:119
本文介绍了重命名文件,现在SVN不允许我提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Aptana开发ColdFusion网站。我们正在使用SVN进行版本控制。

I'm developing a ColdFusion website using Aptana. We're using SVN for version control.

我重命名了几个文件,现在尝试提交其中一个,但是出现以下错误:

I renamed a few files and am now trying to commit one of them, but I'm getting the following error:

'SVN Commit' has encountered a problem.
org.apache.subversion.javahl.ClientException: Illegal target for the requested operation
svn: Commit failed (details follow):
svn: Cannot commit 'R:\myPath\My-New-File-Name.cfm' because it was moved from 'R:\myPath\My-Old-File-Name.cfm' which is not part of the commit; both sides of the move must be committed together

这似乎表明我需要同时提交文件(已重命名)和新的重命名文件一起。我该如何提交不再存在的文件...?

This seems to indicate that I need to commit both the previous file (that was renamed) and the new renamed file together. How can I commit a file that no longer exists...?

推荐答案

提交目录,而不是文件。

Commit the directory, not the file.

将目录视为包含其包含的文件列表的文本文件,则可以看到要成功提交,需要更新目录本身,以便可以删除旧目录条目并添加新条目。这将在SVN中显示为删除旧文件并添加新文件(即,对目录进行2次更改,而不对文件进行1次更改)

Think of a directory as a text file containing the list of files it contains, then you can see that to commit successfully, you need to update the directory itself so it can remove the old entry and add the new entry. This will show up in SVN as deleting the old and adding the new file (ie 2 changes to the directory, not 1 change to the file)

如果只想提交1个文件,则需要将其他更改的文件临时添加到忽略列表。

If only want to commit the 1 file, you will need to add the other changed files to an ignore list temporarily.

这篇关于重命名文件,现在SVN不允许我提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆