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

Re: [Subclipse-users] Remove followed by add of same file

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-03-06 22:25:30 CET

Aaron Digulla <digulla@hepe.com> wrote on 03/06/2006 04:17:35 PM:

> I ran into the same bug today but during a refactoring. It left my
> project in a sad state (all the imports were already changed).
>
> Without revision control, I would expect these two operations to be the
> same:
>
> - Copy a file over an existing file
> - Delete the destination and create a new file with the same name
>
> Now with SVN, it will notice and remember the delete but what harm can
> come from silently reverting the delete when someone tries to create a
> deleted file?

For one thing, revert is going to put the old file back and fail because
the new file is there. So that means adding code to move the new file, do
the revert, and put back the new file. The next issue is that we are not
really notified when a new file is created. At best we would have to have
a Resource change listener listening for new files and then running this
code which may have difficulties and performance implications.

> If the user wanted the delete in the repository, he could have committed
> it before the copy. If not, the two operations should be equal for all
> cases that I can imagine.
>
> It also shouldn't be hard to do because you already notice the problem
> and show an error.

If it is not hard, then submit a patch.

> Another solution: Show a dialog which gives the option "Forget about the
> delete" and "Continue". But I really can't see why someone would like to
> abort what he's currently doing because of this error.

Another solution could be to use the DeferFileDelete property that I
previously described. Then we will not perform svn deletes when a file is
deleted and the problem will not occur.

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Mon Mar 6 22:26:55 2006

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.