TortoiseSVN
TortoiseSVN - 无法重命名文件(TortoiseSVN - Cannot rename file)我尝试使用TortoiseSVN 1.8(Windows 7)重命名Excel文件,但没有意识到我当时在Excel中打开了文件。 重命名失败,Tortoise告诉我文件被打开了。 但是,当我尝试重命名文件时,我收到错误消息,说文件已经存在。 它没有! 在我的工作副本中没有与此相关的其他文件。 看起来Tortoise试图创建新命名的文件,将其添加到SVN,意识到它不能删除旧文件并删除新文件,但还没有从SVN中删除不存在的新文件。 我该怎么办? 我尝试使用默认设置清理但是虽然它成功了但它没有帮助。
I tried to rename an Excel file using TortoiseSVN 1.8 (Windows 7) but didn't realise I had left the file open in Excel at the time. The rename failed with Tortoise telling me the file was opened. However, when I try to rename with the file closed, I get error messages saying the file already exists. It doesn't! There is no other file related to this one in my working copy. It looks like Tortoise has tried to create the newly-named file, added it to SVN, realised it can't delete the old one and deleted the new, but hasn't removed the non-existent new file from SVN. What can I do about this? I tried Clean Up with the default settings but although it succeeded, it didn't help.
最满意答案谢谢你提醒我命令行。 我去了一个命令shell并在文件夹上做了svn st ,并在重命名的文件上看到了感叹号(即找不到文件)。 所以我做了一个svn rm <new file> ,签入, svn rename <old file> <new file>并再次签入 - 似乎工作正常。 将来关于重命名打开文件需要小心!
Thanks for reminding me of the command line. I went to a command shell and did svn st on the folder, and saw the exclamation mark on the renamed file (i.e. file not found). So I did an svn rm <new file>, checked in, svn rename <old file> <new file> and checked in again - seems to have worked fine. Will need to be careful in future about renaming open files!