tags:

views:

42

answers:

3

There is a file, let's call it fileToBeIgnored, that is versioned in SVN and shouldn't be. I understand that svn:ignore only prevents the addition of files to the SVN repository. Already versioned files will keep on getting versioned regardless of matching the pattern. I'm perfectly ok with removing fileToBeIgnored from the SVN repository and adding it to its directory's svn:ignore property. My problem is, if I do that, when other users do their next update, their SVN client will try to remove their local copy of fileToBeIgnored. I don't want that. I would like for everyone's currently existing local copy to be preserved.

Is there a way to remove a file from the SVN repository without it being removed from a user's local copy on subsequent update?

A: 

Is there a way to remove a file from the SVN repository without it being removed from a user's local copy on subsequent update?

I don't think so.

What I would do is to send a mail to everyone notifying them of the change. Whoever doesn't manage to keep a copy on the side can always get an earlier version of the file from the repository.

sbi
Mmmm... it *might* be possible if you removed the file, and added a `svn:ignore` at the same time
Pekka
A: 

Move the file to a different folder.
Remove from SVN.
Update.
Add the file back to the folder.
Commit with svn:ignore.

Davy8
A: 

Do the commit with the delete and the property change; then there are two scenarios:

  • Another dev has no local changes. He updates, and his file is deleted. He can just svn cat the appropriate revision of the file to his working copy again.
  • Another dev has local changes. When he updates, he gets a tree conflict. He can svn resolve --accept=working ToBeIgnored to resolve the conflict, then svn rm --keep-local ToBeIgnored to avoid adding the file to version control again, while keeping his local copy.
shambulator