Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn path not found on branch not involved in merge operation

Tags:

svn

I am trying to merge a single file from my trunk up to a branch(wc) and am getting an odd path not found error for a path that looks to be on a branch not involved in the current merge operation.

For example, in our svn project we have:

  • branches
    • branch0
    • branch1
    • branch2
    • branch3
    • branch4
  • tags
    • ...[some tags]
  • trunk

I have checked out branch4 and it is my working copy. After fixing a production bug on the trunk, I want to merge my change from the trunk into branch4. I try to do this using the following command:

svn merge https://svn.svnprovider.com/my-account/my-project/trunk/path/to/file/my-file.java path/to/file/my-file.java

I have done this with other files without issue, however, for this file I get an error similar to: (proprietary info in real files and path, hence the example)

svn: '/my-account/!svn/bc/1732/my-project/branches/branch1/path/to/file/my-file.java' path not found

At one point in history branch1 was our working branch and it was re-integrated onto the trunk. All branches, to my knowledge, have been created from the trunk and not from other branches. So I am wondering first what is happening and second, how do I fix this.

I have read several posts talking about svn:mergeinfo and how that can cause similar issues and that this was particularly problematic when users were using tortise. We have had a few tortise users come and go on the project, so this could be the root cause of the problem - still need a fix though.

Has anyone encountered a similar issue and determined a root cause and a fix. Much appreciation.

like image 401
reverend Avatar asked Nov 03 '10 20:11

reverend


2 Answers

Try using the --ignore-ancestry option when doing the merge. It could be the merge history is incomplete (possibly due to tortoise or any client for that fact) and something that was done on branch1 is trying to be applied to the working copy when you do a 'normal' merge.

like image 61
jgifford25 Avatar answered Nov 20 '22 05:11

jgifford25


I encountered a similar problem. Like in reverend's case, my file was once in a different branch, merged back into the trunk and branched out again.

The cause of the error is not traceable for me though.

What helped me was to use the -c parameter and merge just the change from the revision I was interested in.

svn merge -c 12345 https://svn.svnprovider.com/my-account/my-project/trunk/path/to/file/my-file.java path/to/file/my-file.java
like image 3
Raffael Avatar answered Nov 20 '22 06:11

Raffael