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

Re: Undoing 'update'

From: Stephen Connolly <stephen.alan.connolly_at_gmail.com>
Date: Fri, 17 Apr 2009 08:44:50 +0100

2009/4/17 Bruno Moreira Guedes <thbmatrix_at_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_at_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"

From then on you can just check-point your work to your branch

when you are ready to merge back to trunk, just follow the merge
instructions in the svn book (if you have svn 1.5 or newer on both the
server and client this merge will likely be trivial)

> So: Is there any way to "undo" a svn update, even after doing some
> "svn resolved"s??

AFAIK, the unfortunate answer is no.

you should have created a branch and check-pointed your changes to
that branch... especially if your changes are really important to you

:-(

> 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

> 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_at_subversion.tigris.org].
>

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-17 09:45:47 CEST

This is an archived mail posted to the Subversion Users mailing list.