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

RE: how to make a previous repository version the actual one?

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-02-02 19:30:35 CET

-----Original Message-----
From: Gabor Nagypal [mailto:nagypalg@gmail.com]

Assume that you have a project with a complicated directory structure,
lots of files etc. Suppose, you started a line of change, committed
many changes several times and after a week you notice, ups, it is
stupid what I am doing. Now I would like to return to the original
state of the project (i.e. two weeks ago).
---------------------------------------------------------------------

Maybe I've overlooked someone mentioning this, but it seems to me that the
most effective way would be:

    # Delete all the files and directories from HEAD
    svn delete http://repository/root
    # Copy revision REV into HEAD.
    svn copy -r REV http://repository/root http://repository/root

More likely, you can't delete the root directory of the repository, so you
have to list out its contents, and delete and copy them individually. OTOH,
maybe you're lucky, and the version you want to revert is really
/repository/root/trunk, in which case you can probably do it in two
commands.

The advantage of this is that it preserves the history correctly. E.g.,
"svn blame" produces the results you expect.

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Feb 2 19:34:05 2005

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

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