Dave Neary wrote:
> 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
> 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).
In this scenario, I think the "has local modifications" message, coupled
with the need to use the --force flag, should be plenty of warning that
the file is really going to go away. I don't think Subversion needs to
provide any further protection. The philosophy is to never lose local
changes without the user explicitly authorizing it, and in this case I
think using the --force flag is the authorization. It generally means
"I know what I'm doing, stop protecting me and just do it".
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes. -- Douglas Adams
Received on Wed Oct 13 19:42:52 2004