svnvisualsvn

SVN: Delete deleted files


I have checked out my SVN repo using svn checkout {url}. I moved some files from there (e.g. foo.cpp and foo.hpp) from folder src to src2 (Take a note that I deleted the original src folder). When I use the following commands:
svn add --force .
svn commit -m "%desc%"
then I notice something strange. The console says that everything is done and revision number {whatever} is finished, but in the repo's UI (I'm using VisualSVN Server) it shows that both folders src and src2 are retained. Either I'm using the wrong command or the wrong args. Or I'm just being a complete noob and forgetting the rules of SVN 🤪. Please help.


Solution

  • As @Dialecticus noted, you need to perform file operations in your working copy using SVN client (e.g., svn.exe, TortoiseSVN, etc.). Subversion does not automatically track move, rename, delete, copy operations — you need to run the corresponding commands manually. If you are using svn.exe client from command prompt, see SVNBook | Basic Work Cycle and the svn.exe command-line reference.

    If you are coding in IDE, then I guess that it either has built-in support for Subversion or an external integration plug-in that translates file operations made via IDE's UI to terms of Subversion. For example, there is the VisualSVN plug-in for Visual Studio. If you drag & drop or rename a file in Visual Studio, the plug-in automatically intercepts this operation and you don't need to track it manually and run SVN commands.