You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brian Erickson <er...@BAUERCONTROLS.com> on 2007/10/01 14:01:18 UTC
Undo folder delete
Hi all,
We had a medium sized disaster here last Friday and I'm wondering if
there was a better way to recover from it...
Our source tree has two folders in it \vme and \pcs. One of our users
accidentally deleted the \pcs folder. He doesn't remember doing an svn
delete but I'll just take it on faith that he did. However, I couldn't
think of a graceful way to recover. Here's what I did:
Checkout revision 190 into d:\head
Checkout revision 189 into d:\lastgood
Removed all .svn folders from 'd:\lastgood\pcs' tree
Xcopy /sdki d:\lastgood\pcs d:\head\pcs
In d:\head folder: svn add pcs
In d:\head folder svn commit
Now revision 189 and 191 match so things seem to be okay.
Was there a better way?
Thanks,
Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Re: Undo folder delete
Posted by Vineet Kumar <vi...@doorstop.net>.
* Brian Erickson (erickson@BAUERCONTROLS.com) [071001 08:26]:
> Hi Mark,
>
> We realized this morning that we lost the history...
>
> Thanks for pointing me in the right direction. I'll know better next
> time...
If you wanted to get back the old history on the current HEAD, you could
re-delete the now-current (no history) HEAD and then restore the
deletion using either the merge or copy techniques you've now read
about. Of course, if any other changes have already gone in since the
original history-less restore, you'd have to manually merge those into
the new restore-with-history too.
Vineet
--
http://www.doorstop.net/
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." --Benjamin Franklin
RE: Re: Undo folder delete
Posted by Brian Erickson <er...@BAUERCONTROLS.com>.
Hi Mark,
We realized this morning that we lost the history...
Thanks for pointing me in the right direction. I'll know better next
time...
Brian
> -----Original Message-----
> From: Mark Phippard [mailto:markphip@gmail.com]
> Sent: Monday, October 01, 2007 10:07 AM
> To: Brian Erickson
> Cc: users@subversion.tigris.org
> Subject: Re: Undo folder delete
>
> On 10/1/07, Brian Erickson <er...@bauercontrols.com> wrote:
> > We had a medium sized disaster here last Friday and I'm
> wondering if
> > there was a better way to recover from it...
> >
> > Our source tree has two folders in it \vme and \pcs. One
> of our users
> > accidentally deleted the \pcs folder. He doesn't remember doing an
> > svn delete but I'll just take it on faith that he did. However, I
> > couldn't think of a graceful way to recover. Here's what I did:
> >
> > Checkout revision 190 into d:\head
> > Checkout revision 189 into d:\lastgood Removed all .svn
> folders from
> > 'd:\lastgood\pcs' tree Xcopy /sdki d:\lastgood\pcs d:\head\pcs In
> > d:\head folder: svn add pcs In d:\head folder svn commit
> Now revision
> > 189 and 191 match so things seem to be okay.
> >
> > Was there a better way?
>
> Yes, there are better ways. You got your content back (which
> might be all you need) but you lost your history. This blog
> shows how you could have done this:
>
> http://blogs.open.collab.net/svn/2007/07/second-chances-.html
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>
> ---------------------------------------------------------------------
> 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
Re: Undo folder delete
Posted by Mark Phippard <ma...@gmail.com>.
On 10/1/07, Brian Erickson <er...@bauercontrols.com> wrote:
> We had a medium sized disaster here last Friday and I'm wondering if
> there was a better way to recover from it...
>
> Our source tree has two folders in it \vme and \pcs. One of our users
> accidentally deleted the \pcs folder. He doesn't remember doing an svn
> delete but I'll just take it on faith that he did. However, I couldn't
> think of a graceful way to recover. Here's what I did:
>
> Checkout revision 190 into d:\head
> Checkout revision 189 into d:\lastgood
> Removed all .svn folders from 'd:\lastgood\pcs' tree
> Xcopy /sdki d:\lastgood\pcs d:\head\pcs
> In d:\head folder: svn add pcs
> In d:\head folder svn commit
> Now revision 189 and 191 match so things seem to be okay.
>
> Was there a better way?
Yes, there are better ways. You got your content back (which might be
all you need) but you lost your history. This blog shows how you
could have done this:
http://blogs.open.collab.net/svn/2007/07/second-chances-.html
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Undo folder delete
Posted by John Allen <jo...@dublinux.net>.
Ulrich Eckhardt wrote:
> Note up front: please don't use the reply-to function in order to start a new
> thread. This is also explained the mailing list guidelines.
>
> On Monday 01 October 2007 16:01, Brian Erickson wrote:
>
>> We had a medium sized disaster here last Friday and I'm wondering if
>> there was a better way to recover from it...
>>
>> Our source tree has two folders in it \vme and \pcs. One of our users
>> accidentally deleted the \pcs folder. He doesn't remember doing an svn
>> delete but I'll just take it on faith that he did.
>>
>
> Huh? A simple 'svn log' on the repository should reveal whether that was the
> case!
>
>
>> However, I couldn't think of a graceful way to recover.
>>
>
> Undoing something is SVN basics and documented in the SVN book! In this case
> you either do a reverse merge or you make a copy from an old revision in the
> repository. However, and that is something which really frightens me, how
> come a user actually deleted the dir in the first place and then checked this
> in? Even if he accidentally deleted the dir, he should not have checked this
> in!
>
>
Easily done. When using some IDE's users delete folders "they" don't
want from their working copies, and don't realias that the IDE will
actually remove them when they do their next commit. Plus they take
little notice of the list of actions that appear when the do the commit,
and point blank refuse to use the "synchronise" option in said IDE.
>> Here's what I did:
>>
>> Checkout revision 190 into d:\head
>> Checkout revision 189 into d:\lastgood
>> Removed all .svn folders from 'd:\lastgood\pcs' tree
>> Xcopy /sdki d:\lastgood\pcs d:\head\pcs
>> In d:\head folder: svn add pcs
>> In d:\head folder svn commit
>> Now revision 189 and 191 match so things seem to be okay.
>>
>> Was there a better way?
>>
>
> Yes, definitely, see above. The disadvantage of your solution is that for
> Subversion, those files that you added are completely new files which it
> doesn't know anything about. Any properties (linending style, keyword
> replacement) that were set on the original files are lost or set to defaults
> that way. Further, and that's something that is IMHO even worse, the whole
> history of those files has been disconnected! Subversion simply doesn't know
> that ../pcs at revision 191 has anything to do with ../pcs at revision 189.
> If you need the whole history, you will have to resort to using "peg
> revisions" in order to get at the deleted parts.
>
> Uli
>
>
--
John Allen mailto:john.allen@codemountain.net
CodeMountain http://www.codemountain.net
Ubuntu gutsy (development branch), kernel 2.6.20-15-generic
up 16 min, 2 users, load average: 0.03, 0.11, 0.11
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Undo folder delete
Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
Note up front: please don't use the reply-to function in order to start a new
thread. This is also explained the mailing list guidelines.
On Monday 01 October 2007 16:01, Brian Erickson wrote:
> We had a medium sized disaster here last Friday and I'm wondering if
> there was a better way to recover from it...
>
> Our source tree has two folders in it \vme and \pcs. One of our users
> accidentally deleted the \pcs folder. He doesn't remember doing an svn
> delete but I'll just take it on faith that he did.
Huh? A simple 'svn log' on the repository should reveal whether that was the
case!
> However, I couldn't think of a graceful way to recover.
Undoing something is SVN basics and documented in the SVN book! In this case
you either do a reverse merge or you make a copy from an old revision in the
repository. However, and that is something which really frightens me, how
come a user actually deleted the dir in the first place and then checked this
in? Even if he accidentally deleted the dir, he should not have checked this
in!
> Here's what I did:
>
> Checkout revision 190 into d:\head
> Checkout revision 189 into d:\lastgood
> Removed all .svn folders from 'd:\lastgood\pcs' tree
> Xcopy /sdki d:\lastgood\pcs d:\head\pcs
> In d:\head folder: svn add pcs
> In d:\head folder svn commit
> Now revision 189 and 191 match so things seem to be okay.
>
> Was there a better way?
Yes, definitely, see above. The disadvantage of your solution is that for
Subversion, those files that you added are completely new files which it
doesn't know anything about. Any properties (linending style, keyword
replacement) that were set on the original files are lost or set to defaults
that way. Further, and that's something that is IMHO even worse, the whole
history of those files has been disconnected! Subversion simply doesn't know
that ../pcs at revision 191 has anything to do with ../pcs at revision 189.
If you need the whole history, you will have to resort to using "peg
revisions" in order to get at the deleted parts.
Uli
--
Sator Laser GmbH
Geschäftsführer: Ronald Boers, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org