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

Re: How to take back a revision from the trunk of a working copy?

From: Blair Zajac <blair_at_orcaware.com>
Date: Thu, 17 Jan 2008 21:38:33 -0800

Ryan Schmidt wrote:
> On Jan 17, 2008, at 23:17, B. Bogart wrote:
>> Point Taken,
>> I'm sending this message to clarify my solution.
>> So rather than removing 227, I can only see one way to get my working
>> copy to keep its contents and commit them as 228.
>> So In short I'm in 226, made some changes, and I want this to be 228.
> This may be the misunderstanding. You need to start at the current HEAD
> revision, that is r227.
>> Svn is not letting me commit due to "Out of Date" messages.
> Right, you cannot commit if your working copy is not up to date.
>> The only solution I found was to copy the changes files out of the
>> working copy, update to the latest revision, copy the old files back
>> over the current working copy and commit.
>> All the merge -c stuff did not solve the issue.
> Given a working copy of trunk at r227, you can apply a reverse-merge of
> revision 227 to take it back:
> svn merge -c-227 url://to/trunk .
> Now
> svn diff
> should confirm that the *reverse* of the changes in r227 have been done
> in your working copy. Now you can commit it:
> svn ci -m "undoing r227 because foo"

Just to add one thing. Ideally you do this reverse merge in a clean working
copy. It's not considered good practice to do any merges into a working copy
with any modifications in it.

So something like this:

svn revert -R .
svn merge -c -227 . .
svn diff
svn ci -m 'revert r277 because foo'


Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
Subversion training, consulting and support
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-18 06:39:07 CET

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.