将分支合并到主干时文件显示为已删除 [英] File is shown as deleted while merging branch to trunk

查看:224
本文介绍了将分支合并到主干时文件显示为已删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Torvise svn选项Merging Two Different Trees

i am merging branch to trunk using tortoise svn option Merging Two Different Trees

我在主干下有文件即file1,但在分支上没有

I have file i.e file1 under trunk but not on branch

我已经检查了到本地的中继.然后 Right- click > Merge > Merging Two Different Trees > mentioned from as trunk url and to as branch url > Test merge

I have checked out trunk to my local .then did Right- click > Merge > Merging Two Different Trees > mentioned from as trunk url and to as branch url > Test merge

现在file1在Test merge results 下显示为已删除,但是为什么?理想情况下,它应该问我该文件在分支下不存在,但 存在于树干上.是否要保留? 是否可以选择?

Now file1 is shown as deleted under Test merge results but why ? Ideally it should ask me that this file does not exist under branch but exist on trunk. Do you want to keep it or not ? Is there an option of doing it ?

更新:-

6月1日,我从树干创建了分支. 6月5日,我在树干下添加了file1.现在,当我尝试将分支合并到主干时,是否应该 显示为已删除?

on 1st june i created the branch from trunk. on 5th june i added the file1 under trunk. Now when when i am trying to merge branch to trunk, should it be displayed as deleted ?

推荐答案

如果从主干创建分支,然后删除了分支中的文件,则在分支日期之后将其视为更改.因此,就像您要合并的其他更改一样,您也可以合并此更改(删除文件).

If you created the branch from trunk and then deleted the file in the branch it is counted as change after the branching date. So like the other changes that you want to merge you merge this one too (deleting the file).

如果在单独的提交中删除了文件,则可以不使用此修订而合并(您可以在turtoise中指定要合并的修订).

If the file is deleted in separate commit you can merge without this revision (you specify which revisions to merge in turtoise).

也可以在本地合并,然后提交合并的版本.因此,仅在您的本地计算机中删除已删除的文件.将合并提交到存储库后,可以取消选中文件的删除或恢复文件的删除.这样,干线将仍然具有该文件.

Also you merge locally and then you commit the merged version. So the deleted file is deleted only in your local computer. When you commit the merge to the repository you can uncheck the deleting of the file or revert the deleting of the file. This way the trunk will still have the file.

这篇关于将分支合并到主干时文件显示为已删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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