7

i have some code projects in separate folders in a svn repository.

Now i have some problems with deleting files: most of the times all goes well, but sometimes when i delete a file or folder from disk the checkin process gives me all kind of errors.

So i was wondering: what exactly is the way to delete folders under svn source control?

do i just delete them in the explorer and then commit the master folder, of do i have to rightclick the folder, and then ?

It seems a trivial question, but deleting files is giving me so much troubles with svn (for the rest i'm realy happy with it).

3 Answers 3

13

Right click file / folder -> TortoiseSVN -> Delete.

And then commit.

2
  • 1
    +1 because forgetting the commit is often the first mistake which eventually leads to the folder reappearing (in a later checkout / update).
    – Edwin Buck
    Commented Aug 19, 2011 at 14:15
  • 1
    @manojlds I have no delete option in my TortoiseSVN menu. Am I missing something?
    – DMEM
    Commented Sep 7, 2016 at 16:12
3

Officially. you should use for all files and folders in your working copy the "TortoiseSVN->Delete" contextmenu.

In reality, TortoiseSVN supports direct FileSystem-deletes as well, but you have to select the checkbox manually in your commit dialog. The Textstatus will show "missing", instead of "deleted" which will be shown if you delete directories/files by the Delete command.

Note that svn-commandline only supports the "official" way by using svn delete or svn rm

Also note that Directories will not be removed from your workingcopy but the folders are marked as deleted until you commit the delete. Thats why you cannot add a file or new folder with the same name. You have to commit the delete first.

1

I develop on a Windows localhost with Tortoise SVN, and I've never had a problem deleting files/folders from SVN. I simply delete the files from my local copy by sending them to the recycle bin before running a commit. Only, be careful to not also delete the (hidden by default) .svn folders too! They must be kept in during the commit.

Not the answer you're looking for? Browse other questions tagged or ask your own question.