30

I did a merge between the trunk and a branch.

On the trunk, there is a folder, let's say templates/Toto.

On the branch, everything but the folder Toto is there (not a local delete, Toto is simply not in the repo).

After I performed the merge (I tried several times), I always end up with a freaking tree conflict "local delete, incoming edit upon merge". However, as I stated, this is NOT a local delete.

What is the proper way to solve this? By proper, I definitely don't mean manual copy of Toto from trunk to branch.

I read the doc, but I'm still stuck.

user229044
  • 232,980
  • 40
  • 330
  • 338
fbiville
  • 8,407
  • 7
  • 51
  • 79

4 Answers4

36

What version(s) of subversion are you using on the client and server side? Version 1.4.x on the server and 1.6.x on the client may end up in 'tree errors'.

Referring to SVN how to resolve new tree conflicts when file is added on two branches

svn resolve --accept working

might do the job.

Community
  • 1
  • 1
zellus
  • 9,617
  • 5
  • 39
  • 56
  • I guess *svn cleanup* did not help either. What does *svn status -u* say? How does an *svn diff* treat your 'Toto' folder? – zellus Sep 23 '10 at 11:12
  • 8
    Unfortunately, this only 'resolves' the conflict. It does not make missing directory appear, absence of which naturally looks like merge defect to me. – Ivan Balashov Jun 22 '12 at 14:50
  • @IvanBalashov : Agree with you. So I "fixed" it with these commands: `svn status | grep ? | colrm 1 8 |xargs svn resolve --accept working` and `svn status | grep ? | colrm 1 8 |xargs svn add` – user454322 Jul 03 '12 at 05:21
  • Typing `svn resolve --accept working` doesn't work for me, I get `svn: E205001: Not enough arguments provided`. (Subversion 1.7.7.) – Jay Sullivan Apr 10 '15 at 17:36
6

If the following doesn't work (it didn't for me), try it through the IDE. I tried it through Netbeans and it worked.

First select the directory and resolve conflicts. It automatically asks whether you want to accept your working directory structure.

svn resolve --accept working templates/Toto
CivFan
  • 13,560
  • 9
  • 41
  • 58
Chandana
  • 61
  • 1
  • 1
1
svn resolve --accept theirs-full templates/Toto

This should bring it the folder from trunk w/out you having to manually copy it

Xavi
  • 20,111
  • 14
  • 72
  • 63
alex
  • 27
  • 2
  • 17
    That did not work for me. The resulting error message was: svn: warning: Tree conflicts can only be resolved to 'working' state; 'src/main/resources/config/dir' not resolved – rajat banerjee Oct 25 '11 at 20:09
1

Same issue w 1.6.x, here's what worked for me (slightly different to above answers, which did not work for me):

svn resolve --accept working templates/Toto

okredo
  • 61
  • 3