SVN merge between two branches - “path not found”



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

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
 

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

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
 

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:

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

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
 

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

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
 

http://stackoverflow.com/questions/12702284/svn-merge-between-two-branches-path-not-found

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

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
 

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

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
 

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值