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

Re: resolving tree conflicts

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 14 Jul 2009 13:23:54 +0100

On Tue, Jul 14, 2009 at 12:22:18PM +0100, James French wrote:
> When the file moves and renames were merged down from the branch to my
> working copy, the moved files had 'lost' the trunk changes. It would
> have been nice if svn had resolved it all into file conflicts, as you
> say, but it didn't so I need to do what I need to do to get my working
> copy correct. I've spent a whole day yesterday fixing file conflicts
> so I don't want to start again now! It's starting to drive me a bit
> insane.

You could start again but take an easier route, see below.

> If someone could give me a precise description of steps to
> perform when a file is moved on the branch and changed on the trunk it
> would help, but no matter how much I google I don't seem to be able to
> get to the nub of the problem.

I've already suggested the following, but maybe I was not clear enough.

Let's say you did this rename:

  svn move /branch/foo /branch/bar

Then, in your trunk working copy, before you do a merge, you do that
same rename:

  cd trunk-wc/
  svn move foo bar
  svn commit -m "replay refactoring made on /branch"

Do this on trunk for all the files and directories which were renamed
on the branch. You can use a single commit on trunk to commit all the
renames if you like.

Now do the merge as usual, and things should fall into place nicely.
The tree structures don't conflict anymore because you made them match.

If you want a helper script that helps with this task, you could take
a look at TruMerge: http://trumerge.open.collab.net
But before using this, get in touch with the authors and ask about
its current status (I'm not sure the snapshots they've uploaded are
still the most recent ones), and make really sure you understand what
trumerge does. For the merge at hand, I'd recommend replaying the
refactoring changes manually.

Stefan
Received on 2009-07-14 14:25:00 CEST

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.