tags:

views:

154

answers:

2

I'm working on a project where someone has checked in some folders and files that are not suppose to be in the repository and are suppose to be on our local, I try to delete them by the following command and it gives me this error

svn delete filename --keep-local
svn: invalid option: --keep-local
+3  A: 

Upgrade to the latest version of the SVN client. The version you have installed doesn't have the --keep-local option yet. This feature was added in SVN 1.5.

Wim Coenen
Also keep in mind that if you have the latest version of Tortoise or Ankh, that doesn't upgrade your command-line client. :)
Dave Markle
+1  A: 

As wcoenen and Dave Markle said, you have an old version that doesn't have the --keep-local option. To be more specific, this option was introduced in version 1.5.

As a workaround:

  1. Copy the files out of your working copy
  2. svn delete
  3. svn commit
  4. Copy them back into the working copy
  5. Add them to svn:ignore so they don't get checked in again!
Michael Hackner
I've given this a +1 because even with the keep-local option, I still had trouble deleting a few years of incorrectly added binary files from my repository. Using keep-local and svn:ignore just caused my files to be deleted completely - I still needed to keep them, I just didn't want them in my repository :)
Stephen Orr