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

RE: Set older revision as new HEAD

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-06-20 17:06:36 CEST

> >>This is what I tried:
> >>svn merge -r HEAD:130 file:///svnreps/sep_ss05/sep1/sep
> >>But it does not fix my problem. What else can I do?

The most common and preferred way to revert changes is through a reverse
merge. But it seems that if the changes are particularly complicated, that
the merge sometimes fails. Here is another method for doing a revert. It
is more brute-force, and as it is uncommon, it might not interact as well
with other tools, but it should work correctly in all circumstances.

Suppose the URL for root directory of your "main" development is
file:///svnreps/sep_ss05/sep1/sep, and that you want to get rid of all
changes in this subtree after rev 130. Then:

svn delete file:///svnreps/sep_ss05/sep1/sep

svn copy -r 130 file:///svnreps/sep_ss05/sep1/sep_at_130 \
file:///svnreps/sep_ss05/sep1/sep

I haven't tried this in its brute-force glory, so I don't know if the "@130"
works to locate the version you want to copy. You may have to do a copy to
a temporary name first, then delete "sip", then rename the temporary name to
"sep".

This will make a new HEAD that is a direct descendant of the rev 130
version, so all of the history between 130 and the old HEAD will (should)
become invisible -- none of those versions have any current descendants.

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jun 20 17:11:39 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.