Resolving tree conflict
Asked Answered
P

2

96

How to resolve tree conflict in current scenerio.

C:\DevBranch
C:\MyBranch

I updated both branches. Edited MyBranch and then committed back. Now want to merge those changes into DevBranch. When I am doing the merge I am getting 'Tree Conflicts'

The last merge operation tried to add the file 'abc.def', but it was already added locally.

How do you want to resolve this conflict?
Keep the file from repository
Keep the local file

How can I resolve?

Peggypegma answered 24/9, 2012 at 6:33 Comment(0)
V
182

What you can do to resolve your conflict is

svn resolve --accept working -R <path>

where <path> is where you have your conflict (can be the root of your repo).

Explanations:

  • resolve asks svn to resolve the conflict
  • accept working specifies to keep your working files
  • -R stands for recursive

EDIT:

To sum up what was said in the comments below:

  • <path> should be the directory in conflict (C:\DevBranch\ in the case of the OP)
  • it's likely that the origin of the conflict is
  • either the use of the svn switch command
  • or having checked the Switch working copy to new branch/tag option at branch creation
  • more information about conflicts can be found in the dedicated section of Tortoise's documentation.
  • to be able to run the command, you should have the CLI tools installed together with Tortoise:

Command line client tools

Vantage answered 24/9, 2012 at 6:53 Comment(4)
what should be path? C:\DevBranch or C:\MyBranch?Peggypegma
It should be C:\DevBranch. BTW, did you use the svn switch command on one of these two folders?Vantage
I think while creating branch I used "switch working directory'Peggypegma
@Luke You can do it like this if you installed the CLI tools together with Tortoise. Just cd to your working copy's root and execute svn resolve --accept working -R ./. If you need more information on doing this with Tortoise, you can check the dedicated section of the documentation... Hope this helps!Vantage
E
-4

Basically, tree conflicts arise if there is some restructure in the folder structure on the branch. You need to delete the conflict folder and use svn cleanup once. Hope this solves your conflict.

Effluence answered 30/1, 2019 at 5:0 Comment(3)
I don't think cleanup will resolve tree conflicts.Hallel
I just tried it and it did not resolve the tree conflict.Allomorph
svn cleanup does not resolve conflicts in any way. You should use svn resolve for this purpose.Covalence

© 2022 - 2024 — McMap. All rights reserved.