由于我在网络上的任何地方都找不到上述问题的答案,所以我自己提供了解决方案。这是一个手动过程,但我找不到任何其他标准解决方案。所以这里是:
假设您要从目录work中删除文件test.txt。现在,如果您通过以下方式强行删除 test.txt
rm -rf test.txt
命令然后在工作目录(或其任何父目录)上的下一个 svn up 上,文件将被恢复。所以诀窍也是从.svn/entries文件中删除它。因此,仅从工作副本中删除test.txt的完整命令序列是:
cd work
rm -rf test.txt
svn st #it shows ! sign beside test.txt which means that
#in the next **svn up** it will be restored
chmod u+w .svn/entries
vi .svn/entries
#delete the lines associated with test.txt
#you need to delete the following 3 lines from .svn/entries
#test.txt
#file
#^L
svn st #it doesn't report test.txt anymore