Re: svn rm

Dave Neary <[email protected]>
Newsgroups gmane.mail.eyebrowse.user,gmane.comp.version-control.subversion.devel
Organization Phenix Engineering
Message-ID <416CF7E1.1050309__47373.1842860163$1097709254$gmane$org@phenix.fr>
Hi Ben,

Ben Collins-Sussman wrote:
> On Oct 12, 2004, at 5:37 PM, Ramoj Paruchuri wrote:
>> $svn rm <file>
>>
>> Problem: if the file is not on the database it removes the local copy
>> too. Is there anyway to get back that file?
> 
> What are you talking about?  'svn' will never destroy unversioned files.

I was guessing that perhaps svn add followed by svn rm (without a ci) 
would cause the problem, but I just tested.

$ touch test
$ svn add test
A         test

$ svn rm test
svn: Use --force to override this restriction
svn: 'test' has local modifications

$ svn revert test
Reverted 'test'

$ ls
test
$

However, if I svn rm --force test at step 2, not only does test get 
removed from versioning, it also gets removed from my sandbox. In this 
particular case (where there has never been a copy of the file 
committed), perhaps svn rm (even with --force) should not delete the 
local copy. That said, you should use svn revert to roll-back an add 
(this is a difference with cvs, where to roll back a cvs add, you did a 
cvs rm).

Cheers,
Dave.

-- 
David Neary
Phenix Engineering
110 ave Jean Jaures, 69007 Lyon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.