Re: svn rm
Michael W Thelen <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.devel,gmane.mail.eyebrowse.user |
|---|---|
| Message-ID | <[email protected]> |
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 > 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). 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
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBbWgKi2mnNBpOvV0RAtCwAKCgVvYIQYxR1qIVq3TtfbVri3EL8QCg7OsW +Tr4UtOFbbVyWBKGDUq/feA= =XVUb -----END PGP SIGNATURE-----