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

Re: [Subclipse-dev] why is it that if i copy/paste over a file that it is then an outgoing deletion?

From: Mark Phippard <markphip_at_gmail.com>
Date: Thu, 8 May 2008 09:24:00 -0400

On Thu, May 8, 2008 at 4:33 AM, Johan Compagner <jcompagner_at_gmail.com> wrote:

> i think we should just focus on the undo..
> Because if we fix that that after the undo the file is in a changed or not
> changed state then
> the copy paste problem is also automatically fixed.

I think that basically means you are going to need to add a resource
change listener that is watching for new files being added. When that
happens, you would have to check the status, do the revert etc. This
will have to be done for every new file that is added.

> So the 2 test cases that i can think of is this:
>
> 1> delete a file that is not changed and undo the deletion
> result must be that the file is back in an no change state.
>
> 2> delete a file that is changed and then undo the deletion
> result must be that the file is back in a changed state (didnt loose any
> changes!)

How are you planning to do #2? Where do you expect to get this file
from? Subversion will not have it anywhere.

> So i guess there is a flaw in the api of svn itself.. you should just be
> able to set the status to what you want..
> or a command: revert to local working copy...

I do not agree this is a flaw and I'd guess you have zero chance of
ever getting an API like that from the Subversion developers.
Statuses are generally calculated on the fly. For example, there is
no stored state that a file is modified. This is something it
determines by checking the file when you ask for the status.
Scheduled add, delete and replace are stored in the working copy and
Subversion gives you an API -- revert, to undo that.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subclipse.tigris.org
For additional commands, e-mail: dev-help_at_subclipse.tigris.org
Received on 2008-05-08 15:24:10 CEST

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