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

Re: rolling back to a previous version

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2006-02-05 00:51:13 CET

Rev. Steve Klett wrote:
>
>
> On 2/4/06, *Rev. Steve Klett* <steveklett@gmail.com
> <mailto:steveklett@gmail.com>> wrote:
>
>
>
> On 2/4/06, *Simon Large* < simon@skirridsystems.co.uk
> <mailto:simon@skirridsystems.co.uk>> wrote:
>
> Stefan Küng wrote:
> > Rev. Steve Klett wrote:
> > > I have tried reading the help to understand this, but I'm still
> > > confused. Basically, I have a file that I would like to roll
> back to
> > > a previous revision. I would like to make a specific
> revision the
> > > "active" revision so that when I do an update on another
> machine, I
> > > get that version of the file. I have tried "Update item to
> revision"
> > > and this seemed to work on one machine, but then when I went to
> > > another machine and did a full update on the whole branch,
> the head
> > > revision of the file in question was retrieved.
> >
> > After "update item to revision", you must of course commit
> that file again!
>
> What were you saying the other day about "I don't know my own
> app" ;-)
>
> If you update to an old revision you can't commit until you
> update to
> HEAD. Use the revision log dialog to revert changes from
> selected revisions.
>
> I am just updating the docs to link to the HowTo section from
> UpdateToRevision.
>
> Simon
>
>
> Oh, I'm glad you said that, I thought I was missing something
> additional. I tried to commit my earlier revision and SVN was
> telling me I couldn't. Further confused and after the spanking I
> recieved from my first post, wasn't about to ask again :)
>
>
>
>
>
> I still can't get this to work as I would expect. Here is what I have done:
>
> 1. Performed update on repository, all files are unmodified.
> 2. Right clicked on file I wish to roll back and chose:
> TortoiseSVN->Show Log
> 3. Right clicked on the revision AFTER the one that I want to be the
> new head revision and chose: "Revert changes from this revision"
> 4. Clicked "yes" to the warning prompt
> 5. Clicked "OK" to the log dlg
> 6. Right clicked on the file I rolled back (which now has a
> conflicted icon) and chose "Commit"
> 7. Entered new comment and clicked OK
>
>
> I then get the error below
> -------------------------------------------------------
> Error: Commit failed (details follow):
> Error: Aborting commit: 'C:\PMDRepository\IF_Firmware\trunk\UI.c'
> remains in conflict
>
>
> I'm not sure what I'm doing wrong, I have read the docs section about
> rolling back and followed them. User error or is something else happening?

I'm assuming you committed several revisions after N, and then decided
to scrap them and go back to rev N.

To get out of the current conflicted state, first revert the file (main
explorer context menu).

1. Update to HEAD
2. Show log
3. Select ALL revisions after the one you want to revert to.
4. From the context menu 'revert changes from these revisions'

That will undo all the recent changes leaving the file in the state it
was in rev N. You should now be able to commit.

Note the 2 different meanings of revert here. The first 'revert' from
the conflicted state was just discarding the local changes and bringing
the file back into line with the repository HEAD.

The second 'revert' from the log dialog (actually a merge in subversion
terms, but the implementation is hidden by TSVN) pulls down the changes
from the repository needed to convert your working copy file back to rev N.

Simon

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Sun Feb 5 00:50:15 2006

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

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