views:

150

answers:

2

I'm currently maintaining a project I've inherited from some one else and the SVN repo is a bit of a mess. I've gone through and cleaned most of it up but there's a folder in the repo where admins can upload files to via a web form within the application. Currently this folder is in SVN and contains several images in SVN. Being the SVN repo is supposed to be used for our code I want to keep the clients assets out of it if at all possible.

However I can't seem to find a way to delete a directory from SVN locally and then not have it be deleted off the server when doing an svn up later on. I tried delete and ignore in tortoisesvn but the directories were still deleted off the server.

It makes complete sense that SVN is doing this, since it wants the copy on the server to match the copy in the repo. And I'm not against just renaming the directory out of the way, doing the update, and then renaming it back since that's easy enough. I'm just wondering if anyone actually knows of any way of doing this?

+1  A: 

There's no way of doing this within Subversion. What you could do is to manually create a file in that directory and then when Subversion attempts to remove it it will fail to do so.

Mike McQuaid
+1  A: 

You could use sparse checkouts. With this feature you can select which directories to check-out. The client remembers which directories you do not want to update, and does neither fetch the updates nor create a checkout for this folder. This needs to be done per-working-copy.

[edit]Ok, sorry, now after reading this again, I'm a bit confused. You want to delete the folder for the checkouts of the developer working copies, but keep it in the working copy of the web-server? How about using a different repository or a different base-directory for the check-out for the server and the developers? Something like:

  • dev/
    • trunk/ branches/ tags/
      • src/
  • res/
    • img/ [/edit]
gimpf