无法删除Subversion中的子目录

时间:2022-11-06 20:51:46

I am using Subversion (svn, 1.8.8) with Android Studio (2.2.1) and I have accidentally added intermediate files to svn that I want to delete now, but this fails on the commit command.

我正在使用Subversion(svn,1.8.8)和Android Studio(2.2.1),我不小心将中间文件添加到我想要删除的svn中,但这在commit命令上失败了。

For example I try to delete the following directory:

例如,我尝试删除以下目录:

ad@TITAN:~/AndroidStudioProjects/SPHA$ svn delete app/build/intermediates/assets
ad@TITAN:~/AndroidStudioProjects/SPHA$ svn status
...
D       app/build/intermediates/assets
...

But when I try to commit it fails:

但是当我尝试提交失败时:

ad@TITAN:~/AndroidStudioProjects/SPHA$ svn commit
...
Deleting       app/build/intermediates/assets
...
Transmitting file data .........................svn: E160016: Commit failed (details follow):
svn: E160016: Path 'app/build' not present
svn: E160016: Your commit message was left in a temporary file:
svn: E160016:    '/home/ad/AndroidStudioProjects/SPHA/svn-commit.2.tmp'

It says that 'app/build' is not present, that is correct because I already deleted and committed that directory successfully before (hoping that it would either delete recursively or would fail).

它说'app / build'不存在,这是正确的,因为我之前已成功删除并提交了该目录(希望它可以递归删除或失败)。

How can I get rid of all subdirectories and files of 'app/build'?

如何摆脱'app / build'的所有子目录和文件?

1 个解决方案

#1


0  

Problem is solved now, I am answering my own question. First I had to add the 'app/build' directory again with the --force option and then I could delete the entire 'app/build' directory. That did the trick.

问题现在解决了,我正在回答我自己的问题。首先,我必须使用--force选项再次添加'app / build'目录,然后我可以删除整个'app / build'目录。这就是诀窍。

I guess that a previous commit got interrupted and left the directory in an 'undefined' state.

我想之前的提交被中断并使目录处于“未定义”状态。

#1


0  

Problem is solved now, I am answering my own question. First I had to add the 'app/build' directory again with the --force option and then I could delete the entire 'app/build' directory. That did the trick.

问题现在解决了,我正在回答我自己的问题。首先,我必须使用--force选项再次添加'app / build'目录,然后我可以删除整个'app / build'目录。这就是诀窍。

I guess that a previous commit got interrupted and left the directory in an 'undefined' state.

我想之前的提交被中断并使目录处于“未定义”状态。