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

Tree conflict: Add/Add on directory

From: Jon Foster <Jon.Foster_at_cabot.co.uk>
Date: Tue, 7 Jun 2011 19:08:44 +0100


I'm having trouble resolving a tree conflict.

I'm working on a feature branch, and I regularly merge from trunk to the
branch. In my latest merge, I got a tree conflict because a directory
("playback") has been added both to trunk and to my branch, with
different contents. I want to get rid of my version and use the one
from trunk.

This should be trivial, but it isn't:

  $ svn resolve --accept theirs-full playback
  svn: warning: Tree conflicts can only be resolved to 'working' state;
'playback' not resolved

So I thought I'd delete the directory and use "svn cp" to copy the
branch version into my working copy. The delete worked:

  $ svn st --depth=empty playback
  D C playback
> local add, incoming add upon merge

And I can easily get the URL I need to copy from:

  $ svn info playback
    URL: http://svnserver/repos/branches/feature/wherever/playback
    Tree conflict: local add, incoming add upon merge
      Source left: (dir)
      Source right: (dir)

But the copy doesn't work:
  $ svn cp http://svnserver/repos/trunk/wherever/playback@3515 .
  svn: Path 'playback' already exists

(I also tried "svn cp
http://svnserver/repos/trunk/wherever/playback@3515 playback", but that
put it in the wrong place (playback/playback/ rather than just
playback/) and seemed to get my working copy in a bugged state,
requiring non-SVN "rm" and "svn cleanup" to get it working again).

I guess I could split the commit into two - if I did a first commit for
the rest of the merge and to delete the "playback" directory, I'd
probably be able to use "svn cp" and do a second commit to re-add it
with the right contents. This seems like a very ugly hack.

Any ideas how to resolve this properly?

Kind regards,


This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
Received on 2011-06-07 20:09:33 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.