由于我在网上找不到以上问题的答案,所以我自己想出了解决办法。这是一个手动的过程,但我没有找到其他标准的解决方案。下面是解决办法:
假设您要从目录work中删除文件test.txt。如果您通过以下命令强制删除test.txt:
rm -rf test.txt
那么在work目录(或任何父目录)的下一次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