【问题标题】:Problems with reintegrate branch to trunk in SVNSVN中将分支重新集成到主干的问题
【发布时间】:2012-03-30 22:19:24
【问题描述】:

我正在尝试将分支重新集成到主干,但是当我在 TortoiseSVN 中单击“测试合并”时,我收到以下消息:

Command: Reintegrate merge https://127.0.0.1/svn/global/branches/somebranch into D:\wwwroot\work 
Error: Reintegrate can only be used if revisions 8459 through 11952 were previously  
Error:  merged from https://127.0.0.1/svn/global/trunk to the reintegrate  
Error:  source, but this is not the case:  
Error:    
Error:  branches/somebranch/file.js  
Error:   
Error:     Missing ranges:  
Error:  /trunk/file.js:11059,11212,11392,11486,11719,11732-11733  
Completed!

但是,分支中的文件和主干中的文件完全一样。当我将主干合并到我的分支时,此文件位于某个分支中。

有人遇到过这个问题吗?

【问题讨论】:

标签: svn merge branch trunk svn-reintegrate


【解决方案1】:

我不是 SVN 专家,但我认为您的答案在:http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-merge.html#tsvn-dug-merge-maintenancehttp://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchemerge.basicmerging.stayinsync

简而言之:无论您的实际更改可能是什么,您都需要使您的分支与主干保持同步,以便重新集成人员准确知道哪些已更改,哪些未更改。

如果您只在分支中进行更改而在主干中没有进行更改,这不是问题。但是,一旦您在主干中进行了一两次更改,分支就需要包含这些内容。

【讨论】:

    【解决方案2】:

    如果您在一个分支上工作,并且一直在与其他人的工作保持同步,那么当您创建主干的工作副本并尝试重新集成您的分支时,如果您收到如下消息,您可能会感到困惑:

    ~/python/orb2 $ svn merge --reintegrate https://paulwhippconsulting.slsapp.com/source/orb/branches/bronze_services
    svn: Reintegrate can only be used if revisions 650 through 694 were previously merged from https://paulwhippconsulting.slsapp.com/source/orb/trunk to the reintegrate source, but this is not the case:
      branches/bronze_services/occl
        Missing ranges: /trunk/occl:650-693
    

    我在 Google 上看到了许多解决方法,但它们让我感到紧张,因为它们是“黑客”。为了解决这个问题,我决定只做消息中暗示的颠​​覆。我回到我的分支并明确合并了指定的修订:

    ~/python/orb $ svn merge -r 650:693 https://paulwhippconsulting.slsapp.com/source/orb/trunk
    ~/python/orb $ svn commit -m 'merged revisions 650:693 from trunk'
    Sending        occl
    

    已提交修订版 695。 一旦我这样做了,我就能够返回到主干的工作副本并重新集成分支而没有任何问题。

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 2012-04-27
      • 2011-11-13
      • 2010-12-15
      • 1970-01-01
      • 1970-01-01
      • 2015-03-28
      • 1970-01-01
      • 2019-09-13
      • 1970-01-01
      相关资源
      最近更新 更多