乌龟SVN-将树干合并到分支中-树冲突 [英] Tortoise SVN - Merge Trunk into Branch - Tree Conflict

查看:810
本文介绍了乌龟SVN-将树干合并到分支中-树冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用的是SVN 1.8,我也使用了Tortoise SVN 1.8.

We are on SVN 1.8 and I'm using Tortoise SVN 1.8 as well.

主要代码位于/project/trunk中.我将进行较大的更改,因此我在/project/branches/x中创建了一个分支,该分支是/project/trunk的副本.

The main code resides on /project/trunk. I will be doing a large change so I created a branch in /project/branches/x that was a copy of /project/trunk.

作为更改的一部分,我需要重新排列目录结构以处理多个客户端.当前,主干看起来像:

As part of the change, I need to rearrange the directory structure to handle multiple clients. Currently the the trunk looks like:

/project/trunk/process/xyz/file1.xml
/project/trunk/process/xyz/file2.xml

我想将结构更改为:

/project/trunk/process/xyz/client1/file1.xml
/project/trunk/process/xyz/client1/file2.xml

我尝试向右拖动到新文件夹中,并使用上下文菜单执行了SVN Move Here.在分支中工作时,我需要对主干中的file1.xml进行更改以解决生产问题.我希望在分支中进行更改,但是当我尝试在Tortoise SVN中进行合并时,由于缺少本地文件,因此出现了冲突.

I tried right-dragging into the new folder and did a SVN Move Here with the context menu. As I'm working on in the branch, I need to make a change to file1.xml in the trunk for a production issue. I want that change in my branch, but when I tried to do a merge in Tortoise SVN, it comes up with a conflict because the local file is missing.

这些选项只是为我提供了解决,推迟或中止的选项.将/trunk/process/xyz/file1.xml更改为/trunk/process/xyz/client1/file1.xml的最佳方法是什么?

The options simply give me options to resolve, postpone or abort. What is the best way to get the change from /trunk/process/xyz/file1.xml into /trunk/process/xyz/client1/file1.xml?

我是SVN的新手,所以请友善:)

I'm kind of a novice in SVN so please be kind :)

推荐答案

好吧,您是SVN中重构地狱"的受害者-这仍然是一个大问题

Well, you are victim of "Refactoring Hell" in SVN - it's still a Big Problem

您至少有两个选择

  • 合并(以消除树冲突)不是合并树(将整个/trunk合并为/branches/x),而是合并单个文件,在这种情况下请合并为file1.xml.
    • 在分支机构的WC中,为单个文件(而不是父文件夹)选择合并",并选择中继的file1.xml作为合并源.
    • 对所有具有树冲突的(移动的)文件重复这些合并
    • Merge (in order to eliminate tree-conflict) not trees (the whole /trunk into /branches/x), but individual files, file1.xml in you case.
      • In WC of branch, select "Merge" for individual file, not parent folder, and trunk's file1.xml as merge source.
      • Repeat these merges for all (moved) files with tree-conflict
      • (安装Mercurial/TortoiseHG/)
      • 启用(绑定THG 3.0)hgsubversion扩展
      • 将SVN存储库克隆为Mercurial存储库
      • 重构,合并,提交到本地HG
      • (因为无法将合并集推回Subversion)Mercurial存储库的归档提示到未版本控制的文件中,该文件必须替换Subversion存储库的WC并提交此更改状态(在Subversion的此修订版中,您的历史记录将被破坏) )
      • 返回使用Subversion存储库和重构代码

      这篇关于乌龟SVN-将树干合并到分支中-树冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆