You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bruno Moreira Guedes <th...@gmail.com> on 2009/04/17 00:49:55 UTC

Undoing 'update'

Hello all,

Firstly, I don't know what history do you prefer to believe, but there
are three versions:

1) "My dog" owned my laptop, changed to my repository working copy
directory, and typed "svn update";
2) "My friend" loose files at his working copy and I'm helping him;
3) I was drunk and accidentally typed "svn update".

But the problem is the changes are very very very importants for me,
simply "the more importants of my life", after a three weeks work...
So: Is there any way to "undo" a svn update, even after doing some
"svn resolved"s??
My employer said I have three days of life.

Thank you all,
--Bruno Moreira Guedes (hopeless)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757910

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Undoing 'update'

Posted by Andreas Mahel <an...@gmx.net>.
Stephen Connolly wrote:
> 2009/4/17 Bruno Moreira Guedes <th...@gmail.com>:
>   
>
>> My employer said I have three days of life.
>>
>>     
>
> You might be able to re-code three weeks work in three days with your
> mangled workspace.... but as you never committed your changes,
> subversion has not kept them for you :-(
>
> Get coding :-( and next time use a branch
>
> Sorry to be the bearer of bad news
>
>   
How about:

svn up -r xxx

where xxx is the revision number of the last update before the
accidental one (-> the one which you would have wanted to create the
branch from, as Stephen wrote)


This should roll back everything to the state of the former revision,
except your changes, of course.
I'm not sure about conflicts which have occurred during the accidental
svn up, neither about heavier changes in the wc structure (like renaming
files or folders etc.).
Before trying this, I'd make a backup of my working copy first.

Best regards,
Andreas

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1764379

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Undoing 'update'

Posted by Edmund Wong <ed...@kdtc.net>.
Henrik Sundberg wrote:
> 
> I think you missed this part:
>>>> So: Is there any way to "undo" a svn update, even after doing some
>>>> "svn resolved"s??
> 

D'oh!  Thanks Henrik.  I knew I was missing something as it
made little sense to me.  Now it makes a lot of sense.

Yikes!  NOW it makes a LOT of sense. Reminder to self: Must BRANCH
and commit often.

Mind you, wouldn't it be possible to undelete those *.mine/theirs,
then revert to an earlier version and do some comparing and
then modify the said files?

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1763720

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Undoing 'update'

Posted by Henrik Sundberg <st...@gmail.com>.
On Fri, Apr 17, 2009 at 10:04 AM, Edmund Wong <ed...@kdtc.net> wrote:
> Here's where I don't understand from his situation.  If he made
> changes to lots of files without making any commits,  and he
> does a 'svn update',  it will actually overwrite his changes
> without prompting or crying conflict?  Did I misunderstand the
> situation?

I think you missed this part:
>>> So: Is there any way to "undo" a svn update, even after doing some
>>> "svn resolved"s??

/$

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1763653

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Undoing 'update'

Posted by Edmund Wong <ed...@kdtc.net>.
Stephen Connolly wrote:
> The rule is, if you are doing more work than you can afford to lose,
> do the work in a branch and commit as often as you cannot afford to
> lose your changes.
> 

Here's where I don't understand from his situation.  If he made
changes to lots of files without making any commits,  and he
does a 'svn update',  it will actually overwrite his changes
without prompting or crying conflict?  Did I misunderstand the
situation?

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1763422

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Undoing 'update'

Posted by Stephen Connolly <st...@gmail.com>.
2009/4/17 Bruno Moreira Guedes <th...@gmail.com>:
> Hello all,
>
> Firstly, I don't know what history do you prefer to believe, but there
> are three versions:
>
> 1) "My dog" owned my laptop, changed to my repository working copy
> directory, and typed "svn update";
> 2) "My friend" loose files at his working copy and I'm helping him;
> 3) I was drunk and accidentally typed "svn update".
>
> But the problem is the changes are very very very importants for me,
> simply "the more importants of my life", after a three weeks work...

The rule is, if you are doing more work than you can afford to lose,
do the work in a branch and commit as often as you cannot afford to
lose your changes.

It is easy to create a branch and switch your working copy over to
that branch if you realise that your changes really want a branch...

svn info
# note the revision and the url
svn cp url@revision  branch-url -m "oops I need a branch as my changes
are too big to lose and not ready for trunk"
svn sw branch-url
svn ci -m "check-pointing my set of big changes"

RE: Undoing 'update'

Posted by Bob Archer <bo...@amsi.com>.
> But I still don't understanding how I do a 'svn resolved' before
> looking at the different releases and my working copy, but I'll be
> more careful.
> 
> Many thank you.

Erm... svn has no way to know you didn't look at them. Basically your
telling it, yea, I looked at this. 

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1771191

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Undoing 'update'

Posted by Bruno Moreira Guedes <th...@gmail.com>.
2009/4/17 Andreas Mahel <an...@gmx.net>:
> Stephen Connolly wrote:
>> 2009/4/17 Bruno Moreira Guedes <th...@gmail.com>:
>>
>>
>>> My employer said I have three days of life.
>>>
>>>
>>
>> You might be able to re-code three weeks work in three days with your
>> mangled workspace.... but as you never committed your changes,
>> subversion has not kept them for you :-(
>>
>> Get coding :-( and next time use a branch
>>
>> Sorry to be the bearer of bad news
>>

Sure, I was totally stupid by not using a branch...

>>
> How about:
>
> svn up -r xxx
>
> where xxx is the revision number of the last update before the
> accidental one (-> the one which you would have wanted to create the
> branch from, as Stephen wrote)
>
>
> This should roll back everything to the state of the former revision,
> except your changes, of course.
> I'm not sure about conflicts which have occurred during the accidental
> svn up, neither about heavier changes in the wc structure (like renaming
> files or folders etc.).
> Before trying this, I'd make a backup of my working copy first.

And I also was many more stupid by not making backup.

>
> Best regards,
> Andreas
>
>

But as stupid as many times has a bit of luck, I made a copy of the
directory after the accident. And, even more luck, by not open the
files in my copy of this IDE(Kdevelop), it does not overwrite the
backup files automatically when it does, which are not included in the
repository. After a long work to find a solution, I remember this
files by seeing them(the ones ended in '~').

But I still don't understanding how I do a 'svn resolved' before
looking at the different releases and my working copy, but I'll be
more careful.

Many thank you.

--Bruno Moreira Guedes

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1771065

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Undoing 'update'

Posted by K F <cm...@yahoo.com>.
Couldn’t you just compare revisions, see what the
differences were and back out what is appropriate?



--- On Fri, 4/17/09, Andreas Mahel <an...@gmx.net> wrote:

From: Andreas Mahel <an...@gmx.net>
Subject: Re: Undoing 'update'
To: users@subversion.tigris.org
Cc: "Stephen Connolly" <st...@gmail.com>, "Bruno Moreira Guedes" <th...@gmail.com>
Date: Friday, April 17, 2009, 9:27 AM

Stephen Connolly wrote:
> 2009/4/17 Bruno Moreira Guedes <th...@gmail.com>:
>   
>
>> My employer said I have three days of life.
>>
>>     
>
> You might be able to re-code three weeks work in three days with your
> mangled workspace.... but as you never committed your changes,
> subversion has not kept them for you :-(
>
> Get coding :-( and next time use a branch
>
> Sorry to be the bearer of bad news
>
>   
How about:

svn up -r xxx

where xxx is the revision number of the last update before the
accidental one (-> the one which you would have wanted to create the
branch from, as Stephen wrote)


This should roll back everything to the state of the former revision,
except your changes, of course.
I'm not sure about conflicts which have occurred during the accidental
svn up, neither about heavier changes in the wc structure (like renaming
files or folders etc.).
Before trying this, I'd make a backup of my working copy first.

Best regards,
Andreas

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1764379

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1768578

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].