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

Re: Reverting a delete

From: Jean-Claude Antonio <jcantonio_at_arcetis.com>
Date: Thu, 07 Feb 2008 10:51:07 +0100

FYI

>svn rm help.txt
D help.txt
>svn commit -m "bad delete"
Suppression trunk\help.txt
Révision 45 propagée.

>svn copy -r44 http://localhost/svn/repo-test/ProjectA/trunk/help.txt
http://localhost/svn/repo-test/ProjectA/trunk/help.txt -m "resurect"
Révision 46 propagée.

>svn up
A help.txt

>svn log help.txt
------------------------------------------------------------------------
r46 | jcantonio | 2008-02-07 10:44:34 +0100 (jeu., 07 févr. 2008) | 1 line
resurect
------------------------------------------------------------------------
r44 | jcantonio | 2008-02-06 18:48:45 +0100 (mer., 06 févr. 2008) | 1 line
...

Troy Curtis Jr a écrit :
> On Feb 6, 2008 4:23 AM, Jean-Claude Antonio <jcantonio_at_arcetis.com> wrote:
>
>> Hi,
>>
>> If you want to keep history you can use:
>> svn copy -r (the revision before it was deleted) url_to_path url_to_path
>> Cheers,
>>
>>
>> Giulio Troccoli a écrit :
>>
>>
>>> One developer deleted a file (with svn delete) and committed. Now we
>>> want that file back. I can think of two ways to do that:
>>>
>>> 1. update to the revision before the deletion, make a copy of the file,
>>> update to HEAD, move back the file, svn add and svn commit
>>> 2. update to HEAD, reverse merge the revison that deleted the file (svn
>>> merge -c-<rev>), svn commit
>>>
>>> The end result is obviously the same: I will have my file back. However:
>>> - the first method does not preserve the history of the file
>>> - none of the methods is a cheap copy
>>>
>>> Am I right? Is there a way to reverse that deletion, preserving the
>>> history and with a cheap copy? In this case, I'm not too bothered about
>>> cheap or non-cheap copies, as it's just one small file. But it would be
>>> nice to know if it's possible it case I would need to do the same for
>>> more and/or larger files.
>>>
>>> Giulio
>>>
>>>
>>> Linedata Services (UK) Ltd
>>> Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
>>> Registered in England and Wales No 3027851 VAT Reg No 778499447
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
>>> For additional commands, e-mail: users-help_at_subversion.tigris.org
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
>> For additional commands, e-mail: users-help_at_subversion.tigris.org
>>
>>
>>
>
> I think you'll also need a peg revision in there:
>
> svn copy -r<rev> url_to_path@<rev> url_to_path
>
> Where <rev> is the revision just before the delete was commited.
>
> Troy
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-07 11:11:32 CET

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.