Tree conflict: local add, incoming add upon merge

596 views
Skip to first unread message

Mark Wakim

unread,
Aug 4, 2010, 11:44:24 AM8/4/10
to us...@subversion.apache.org
Hi all,

I am working on a project where we have trunk, and a branch which I will call BranchX.  A couple weks ago I added a directory (myDirectory) to trunk, I then did an svn copy to add that directory to BranchX.

I am now merging the latest changes from trunk into BranchX, but I am getting a conflict:

C myDirectory
      >   local add, incoming add upon merge

There are no code changes between myDirectory in trunk and BranchX.  Why am I getting this conflict?  I thought svn copy was the proper way to copy files/directories between branches?  Does anyone know how I can resolve this so that in future commits people will not have to deal with this conflict again?

Thanks so much!

Mark

Tyler Roscoe

unread,
Aug 4, 2010, 12:23:05 PM8/4/10
to Mark Wakim, us...@subversion.apache.org
On Wed, Aug 04, 2010 at 03:44:24PM +0000, Mark Wakim wrote:
> I am working on a project where we have trunk, and a branch which I
> will call BranchX. A couple weks ago I added a directory
> (myDirectory) to trunk, I then did an svn copy to add that directory
> to BranchX.

The best way to get changes from one branch to another is always to
merge.

> I am now merging the latest changes from trunk into BranchX, but I am
> getting a conflict:
>
> C myDirectory
> > local add, incoming add upon merge

Right. The directory already exists in your branch, so svn is confused.
This confusing is because, without doing a merge, svn has no way to know
how the new directory ended up on your branch.

> There are no code changes between myDirectory in trunk and BranchX.
> Why am I getting this conflict? I thought svn copy was the proper way
> to copy files/directories between branches? Does anyone know how I
> can resolve this so that in future commits people will not have to
> deal with this conflict again?

If there are no changes, I would delete the directory from branchx and
then merge from trunk to recreate the directory on branchx.

tyler

Mark _

unread,
Aug 4, 2010, 3:12:08 PM8/4/10
to ty...@cryptio.net, us...@subversion.apache.org
Thanks, deleting the conflicting files then merging worked perfectly.  I'll definitely use svn merge instead of svn copy in the future!

Mark

> Date: Wed, 4 Aug 2010 09:23:05 -0700
> From: ty...@cryptio.net
> To: mark...@hotmail.com
> CC: us...@subversion.apache.org
> Subject: Re: Tree conflict: local add, incoming add upon merge

Ulrich Eckhardt

unread,
Aug 5, 2010, 2:56:15 AM8/5/10
to us...@subversion.apache.org

Why not simply merge the revision where the dir was added to the trunk into
the branch? This will obviously generate a tree conflict with the dir, plus
perhaps some other changes. The tree conflict could be solved by reverting
the merge operation there, all other changes including the svn:mergeinfo
would remain.

Uli

--
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**************************************************************************************
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************

Tyler Roscoe

unread,
Aug 5, 2010, 11:46:45 AM8/5/10
to us...@subversion.apache.org
On Thu, Aug 05, 2010 at 08:56:15AM +0200, Ulrich Eckhardt wrote:
> On Wednesday 04 August 2010, Tyler Roscoe wrote:
> >
> > If there are no changes, I would delete the directory from branchx and
> > then merge from trunk to recreate the directory on branchx.
>
> Why not simply merge the revision where the dir was added to the trunk into
> the branch? This will obviously generate a tree conflict with the dir, plus
> perhaps some other changes. The tree conflict could be solved by reverting
> the merge operation there, all other changes including the svn:mergeinfo

I suggested deleting and re-merging because it is fewer steps and
requires less munging with mergeinfo.

tyler

Reply all
Reply to author
Forward
0 new messages