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

Re: SVN revert.

From: Andy Levy <andy.levy_at_gmail.com>
Date: Wed, 14 Oct 2009 15:08:59 -0400

On Wed, Oct 14, 2009 at 14:37, Steve Constable
<steve.constable_at_hotmail.com> wrote:
> I want to revert -rHEAD to -rOLD (where OLD represents some valid previous
> revision).
> I have not made any local changes but simply recognize that the OLD version
> is where I want to be and continue from there.
> I've 'Googled' my question and some have suggested using 'merge' and then
> commit.
> Here is what I tried:
> svn merge -rHEAD:50 Folder_name
> svn commit Folder_name -m "try to revert back to -r50 as an experiment"
> But neither command generated any output from SVN. I was expecting to
> see the command output similar to when I check in a bunch of files.
> When I did a svn stat, I see that I'm still at the HEAD. What I was really
> expecting to see was that I'm now at HEAD+1 and the contents of HEAD+1 is
> really the exact same as -rOLD.
> Maybe SVN is not meant to be able to move the HEAD back to some old version?
> Is there some way that others have achieved this?
> It seems like a core functionality-so it must be do-able....no?

You're misunderstanding the purpose of revert. Revert is only to undo
changes in your working copy since the last update/commit. It does not
touch the repository.

To roll back to a previous version, you need to do a "reverse merge".
See http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-14 21:10:14 CEST

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