2

I'm trying to delete some files from my repository. First, I use 'svn delete somefile' after which the file is deleted locally and 'svn status' gives

D somefile

as expected. However, if I try to 'svn commit somefile' after that, I get the following error:

svn: Commit failed (details follow): svn: 'somefile' is not under version control

I think I made the mistake of deleting the files locally first and so 'svn status' gave me

! somefile

which I suspect is the cause of all my troubles now. When I realized my mistake, I thought that I should just checkout a fresh copy and 'svn delete' the files. Clearly that does not work. What I don't understand is if I checkout a fresh copy from the repository, the file is not only present locally, but 'svn status' does not give any indication of there being a problem. To me, that indicates that the repository should be ok, but clearly it is not.

What's the easiest way to fix my problem? (I'm using the svn command-line client version 1.6.17 on Mac OS 10.7.3.)

4

2 回答 2

2
  1. 再次从新文件夹中的 SVN 签出文件。
  2. 将您要提交的文件复制到新签出的文件夹并执行 svn add。
  3. 从新文件夹提交。
于 2012-04-28T05:05:54.107 回答
1

svn delete <somefile>-> 从本地文件夹中删除文件

svn add <somefile>-> 在本地文件夹中将文件标记为“已添加”

svn commit-> 将所有更改发送到您的 svn 存储库

如果您 svn commit <somefile>想在 SVN 不知道的路径中提交更改,因为从未添加过。

如果你有问题尝试做一个svn cleanup,否则做一个全新的清理并重新开始你的更改。

于 2012-04-28T07:05:35.537 回答