[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn rm

From: Dave Neary <david_at_phenix.fr>
Date: 2004-10-13 11:39:45 CEST

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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 13 11:40:43 2004

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.