SVN merge between two branches - “path not found”



12 down vote favorite
2

I've got two branches (children of trunk) that need to be merged into one branch for testing, but they can't go into trunk. Both branches are up-to-date with trunk@HEAD. So I want to go from this:

__________________trunk
  \___duck   \
              \___beaver

to this:

__________________________trunk
  \
   \______________platypus

I created the branch platypus from the latest version of trunk, and am trying to merge duck and beaver into this new copy of trunk:

svn copy ^/trunk ^/branches/platypus;
svn switch ^/branches/platypus;
svn merge --reintegrate ^/branches/duck;
svn merge --reintegrate ^/branches/beaver;

but the merge ops fail

svn: '/blah/!svn/bc/12047/repo/branches/duck' path not found

If I try to --reintegrate duck (or beaver) into trunk it works fine. What am I missing here?

share improve this question
 
 
duck, beaver, plutypus - very funny –  Konstantin  Feb 18 at 10:40

4 Answers

active oldest votes
up vote 13 down vote accepted

I had the same error and was able to solve it by manually specifying all of the revision numbers I wanted to merge rather than letting SVN decide. This allowed the merge to continue and prompted me for merge conflicts, as expected.

I was using TortoiseSVN to pick the revisions by hand but I presume using the SVN command line it would be something like:

svn log --stop-on-copy https://svn.blah/svn/proj1/branches/xyz

Then note down all the revision numbers and merge them all in one go, e.g.:

svn merge -c123,124,156,159 https://svn.blah/svn/proj1/branches/xyz
share improve this answer
 
up vote 0 down vote

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 branch is trying to be applied to the working copy when you do a 'normal' merge.

share improve this answer
 
1  
Thanks but that doesn't work. You can't use --reintegrate and --ignore-ancestry at the same time and a merge without --reintegrate just creates a ton of conflicts because both branches have the same trunk –  MatW  Oct 3 '12 at 5:36
up vote 0 down vote

I had a similar problem reintegrating a branch which had been merged from another branch (itself now reintegrated). Like this:

-----------------------------r7------------------
  \                         /             /ERROR !svn/bc/4/repo/branches/duck' path not found
   r1----dinosaur--r5-------             /
                    \---duck------------r9

It doesn't seem to be possible to reintegrate duck, the path not found error complained about r4 - but i could merge specific revisions (r5-r9) from duck back to trunk.

share improve this answer
 
up vote 0 down vote

I resolved this as follows:

  1. Merged the problematic branches into trunk

  2. Created new "consolidated" branch from trunk

  3. Reverted trunk to its state prior to step 1 and committed the reversion

  4. Merged record only from step 3 into branch

  5. Tested by merging new consolidated branch back to trunk, but did not commit it of course

End result is a new branch containing the changes from the feature branches and trunk unchanged (but alas with some new entries in the log).

share improve this answer
来自stackovewflow:
12 down vote favorite
2

I've got two branches (children of trunk) that need to be merged into one branch for testing, but they can't go into trunk. Both branches are up-to-date with trunk@HEAD. So I want to go from this:

__________________trunk
  \___duck   \
              \___beaver

to this:

__________________________trunk
  \
   \______________platypus

I created the branch platypus from the latest version of trunk, and am trying to merge duck and beaver into this new copy of trunk:

svn copy ^/trunk ^/branches/platypus;
svn switch ^/branches/platypus;
svn merge --reintegrate ^/branches/duck;
svn merge --reintegrate ^/branches/beaver;

but the merge ops fail

svn: '/blah/!svn/bc/12047/repo/branches/duck' path not found

If I try to --reintegrate duck (or beaver) into trunk it works fine. What am I missing here?

share improve this question
 
 
duck, beaver, plutypus - very funny –  Konstantin  Feb 18 at 10:40
add a comment

4 Answers

active oldest votes
up vote 13 down vote accepted

I had the same error and was able to solve it by manually specifying all of the revision numbers I wanted to merge rather than letting SVN decide. This allowed the merge to continue and prompted me for merge conflicts, as expected.

I was using TortoiseSVN to pick the revisions by hand but I presume using the SVN command line it would be something like:

svn log --stop-on-copy https://svn.blah/svn/proj1/branches/xyz

Then note down all the revision numbers and merge them all in one go, e.g.:

svn merge -c123,124,156,159 https://svn.blah/svn/proj1/branches/xyz
share improve this answer
 
add a comment
up vote 0 down vote

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 branch is trying to be applied to the working copy when you do a 'normal' merge.

share improve this answer
 
1  
Thanks but that doesn't work. You can't use --reintegrate and --ignore-ancestry at the same time and a merge without --reintegrate just creates a ton of conflicts because both branches have the same trunk –  MatW  Oct 3 '12 at 5:36
add a comment
up vote 0 down vote

I had a similar problem reintegrating a branch which had been merged from another branch (itself now reintegrated). Like this:

-----------------------------r7------------------
  \                         /             /ERROR !svn/bc/4/repo/branches/duck' path not found
   r1----dinosaur--r5-------             /
                    \---duck------------r9

It doesn't seem to be possible to reintegrate duck, the path not found error complained about r4 - but i could merge specific revisions (r5-r9) from duck back to trunk.

share improve this answer
 
add a comment

http://stackoverflow.com/questions/12702284/svn-merge-between-two-branches-path-not-found
12 down vote favorite
2

I've got two branches (children of trunk) that need to be merged into one branch for testing, but they can't go into trunk. Both branches are up-to-date with trunk@HEAD. So I want to go from this:

__________________trunk
  \___duck   \
              \___beaver

to this:

__________________________trunk
  \
   \______________platypus

I created the branch platypus from the latest version of trunk, and am trying to merge duck and beaver into this new copy of trunk:

svn copy ^/trunk ^/branches/platypus;
svn switch ^/branches/platypus;
svn merge --reintegrate ^/branches/duck;
svn merge --reintegrate ^/branches/beaver;

but the merge ops fail

svn: '/blah/!svn/bc/12047/repo/branches/duck' path not found

If I try to --reintegrate duck (or beaver) into trunk it works fine. What am I missing here?

share improve this question
 
    
duck, beaver, plutypus - very funny –  Konstantin  Feb 18 at 10:40
add a comment

4 Answers

active oldest votes
up vote 13 down vote accepted

I had the same error and was able to solve it by manually specifying all of the revision numbers I wanted to merge rather than letting SVN decide. This allowed the merge to continue and prompted me for merge conflicts, as expected.

I was using TortoiseSVN to pick the revisions by hand but I presume using the SVN command line it would be something like:

svn log --stop-on-copy https://svn.blah/svn/proj1/branches/xyz

Then note down all the revision numbers and merge them all in one go, e.g.:

svn merge -c123,124,156,159 https://svn.blah/svn/proj1/branches/xyz
share improve this answer
 
add a comment
up vote 0 down vote

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 branch is trying to be applied to the working copy when you do a 'normal' merge.

share improve this answer
 
1  
Thanks but that doesn't work. You can't use --reintegrate and --ignore-ancestry at the same time and a merge without --reintegrate just creates a ton of conflicts because both branches have the same trunk –  MatW  Oct 3 '12 at 5:36
add a comment
up vote 0 down vote

I had a similar problem reintegrating a branch which had been merged from another branch (itself now reintegrated). Like this:

-----------------------------r7------------------
  \                         /             /ERROR !svn/bc/4/repo/branches/duck' path not found
   r1----dinosaur--r5-------             /
                    \---duck------------r9

It doesn't seem to be possible to reintegrate duck, the path not found error complained about r4 - but i could merge specific revisions (r5-r9) from duck back to trunk.

share improve this answer
 
add a comment
up vote 0 down vote

I resolved this as follows:

  1. Merged the problematic branches into trunk

  2. Created new "consolidated" branch from trunk

  3. Reverted trunk to its state prior to step 1 and committed the reversion

  4. Merged record only from step 3 into branch

  5. Tested by merging new consolidated branch back to trunk, but did not commit it of course

End result is a new branch containing the changes from the feature branches and trunk unchanged (but alas with some new entries in the log).

share improve this answer

你可能感兴趣的:(svn,svn)