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

Re: How Subversion drove me to shoot myself in the foot.

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: 2006-04-19 14:42:41 CEST

On 4/19/2006 9:39 AM, Phil Endecott wrote:
> Fabian Cenedese <Cenedese@indel.ch> wrote:
>
>> The problem in
>> this case is that svn delete (without --force) didn't work in the first place
>> as opposite action to svn add.
>
> I disagree, and I'll repeat my earlier suggestion, which no-one seems to have picked up on yet:
>
> "svn delete" shouldn't be trying to be the opposite of "svn add", it should by trying to be the same as a normal "rm" (or "del"), plus updating the Subversion data as necessary to record what it has done. "svn delete" should *always* delete the file in the working copy, and there should be no doubt in anyone's mind that it is going to do so since a "golden rule" should be that "svn XYZ" does the same as the OS XYZ command plus updating the Subversion data.

This is how it behaves when the working copy is clean, without
uncommitted changes. In the current situation with uncommitted changes
it would result in loss of work, something svn tries really hard to avoid.

I think the current behaviour is correct:
"svn del" should behave as "rm" when the action is reversible, but
should complain and require special flags when it would result in
irreversible changes.

Ryan Schmidt's suggestion to change the complaint sounds like the best
solution to me:

> "You cannot 'svn delete foo' because foo is not yet in the
> repository. If you want to revert the scheduled addition of foo, use
> 'svn revert foo'."

> Reversing an add is not the same as deleting a file; it could perhaps be "svn subtract", "svn release", or something.

Or "svn revert", as currently.

Duncan Murdoch

>
> Thoughts?
>
> --Phil.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 19 14:44:38 2006

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.