tags:

views:

58

answers:

2

I need to cut a release of our software based on the latest revision of our svn repository. But there is a set of changes that we don't want - 20 or so files that were edited a month ago and then committed all at once.

I made a branch called 4.3.x from the trunk, containing all the changes we want and the 20 or so that we don't want. Now I want to get rid of those unwanted changes, which were checked in at revision 104348. r104348 does not involve any other files, just the ones we want to roll back to the way they were at 104347.

I checked out a working copy of the branch, and tried this from the root of the wc:

svn merge --dry-run -r 104347:104348 [url of trunk]

I thought this would figure out what changed between 104347 and 104348 in the trunk, and apply those changes to my working copy. But instead it did nothing. So I tried a diff:

svn diff -r 104347:104348 [url of trunk]

which outputs exactly the changes that I want to apply to my working copy.

I figured it was an ancestry problem, so I tried the dry run again with --ignore-ancestry. It still produces no output and svn status shows no changes. I don't know what else to try - what am I doing wrong?

Update: I tried the reverse merge, which definitely should have worked, but it produced only this:

--- Reverse-merging r104348 into '.':
C [one file out of the 29]
Summary of conflicts:
Tree conflicts: 1

diff still lists all the changes.

None of these files has been moved or renamed recently. I understand this might be some idiosyncratic weirdness that can't be fixed from afar, but does anyone have any suggestions about what I could try?

A: 

You need a reverse merge:

svn merge --dry-run -r104348:104347 [trunk]
hobodave
I figured it would be something obvious... Thank you!
user191839: this is the part where you upvote me and click the checkmark to accept my answer
hobodave
I was busy trying out your solution, which as it turns out didn't solve the problem.
It normally does, your problem was just insufficiently described. Regardless, a reverse merge is _how_ you undo a revision in subversion, so downvoting me is silly. If you have tree conflicts then I suggest you RTFM regarding how to deal with those (good luck), as that is an entirely separate beast.
hobodave
A: 

Since you are trying to reverse changes, you should reverse the order of revisions (i.e. 104348:104347)