Removing a versioned file/directory from version control without deleting it
From: Hans Salvisberg <svn.users_at_salvisberg.com>
Date: 2006-10-27 18:27:20 CEST
I've just started to use Subversion to run an entire Linux file system under version control, and it works great! Obviously, it requires setting quite a few svn:ignore properties. Nonetheless, I often have to remove files and/or entire directories from version control when I find out that they keep changing and that I'd rather ignore them.
In a post in the archives someone suggested the following for unversioning a file:
> $ cp -p foo foo.keep
This is flawed for several reasons:
Also, removing the directory and regenerating it from a previous version doesn't work either, because SVN doesn't restore permissions, ownership, timestamps. Moreover, directories can contain pipes -- this is not a problem for svn if you duly svn:ignore them, but any scheme based on removing/restoring or copying just won't work.
Please implement a --keep switch to go along with 'svn delete'. For files it should be real easy, for directories it's a bit more involved, but it serves a very real and legitimate need, and I see no reasonably easy way to do it with a shell script.
Also adding a --keepandignore switch that would also add foo to the svn:ignore property of the containing directory (if it's not already covered!), would be the icing on the cake.
Actually, that same intelligent ignore functionality would be useful in its own right, something like 'svn ignore PATH...'.
Hans
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.