[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: Johan Compagner <jcompagner_at_gmail.com>
Date: Thu, 8 May 2008 16:35:14 +0200

so in pseudo

if (added)
{
 if(testExistingFileForSvn/HasDeletedStatus())
 {
        read the contents in buffer (or temp file if the size > XXXX)
        call revert.
        write the contents.
 }
}

its a bit of a hack, but that would work i guess it would be slow on big
files :(

On Thu, May 8, 2008 at 4:26 PM, Mark Phippard <markphip_at_gmail.com> wrote:

> On Thu, May 8, 2008 at 10:18 AM, Martinescu, Eduard >
> > If I follow this discussion, I think the solution you are looking for is
> not
> > 'revert' , but 'add'.
> >
> >
> >
> > 1) Delete a versioned file from project
> >
> > 2) Restore the file from local history via 'undo'
> >
> > 3) Do and 'svn add' against the file, it will change the pending
> state
> > from 'delete' to 'replace'
> >
> > So the solution is that if we could detect the 'undo' as such, we could
> > issue an 'svn add' command to undo the pending delete operation.
>
> That is not a solution. Replace is not what someone would want or
> expect here and the end result would fail both of the tests that Johan
> proposed.
>
> Replace means you are creating a new line of history within
> Subversion. So for example, after you commit, history on the new file
> would stop at the replace operation, as there would be no connection
> to that original file.
>
> The only thing you can do is revert. The problem is that you will
> also need to do something to manage the file contents, as revert is
> going to restore the pristine revision. So if there are changes, they
> need to be fetched from somewhere and restored after the revert
> completes.
>
> --
> 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 16:35:24 CEST

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

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