颠覆合并删除命令 [英] subversion merge a delete command

查看:68
本文介绍了颠覆合并删除命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将主干合并到功能分支中时,主干上发生的删除将不会复制到我的工作副本中.

When I merge the trunk into a feature-branch, a delete that occurred on the trunk will not be replicated to my working copy.

为什么合并时干线上的删除不删除分支上的相同文件? 我正在使用Subversion 1.5客户端和服务器.

Why will a delete on trunk not delete the same file on a branch when merging? I'm using subversion 1.5 client and server.

我假设重新集成分支时会跳过对分支中文件的更改?

I'm assuming that changes to the file in the branch will be skipped when reintegrating the branch?

在中继上赎回文件的最佳方法是什么,因为同事只是因为文件未准备好而从中继删除了文件.

What's the best way to redeem the file on trunk, as a colleague deleted the file from trunk only because it was not "ready".

情况:

cd project; svn copy trunk branches/f1; svn ci -m "branching out" branches f1;
echo "modifying a file on branch." >> branches/f1/file1; svn ci branches/f1 -m "Branch modified"; 
echo "Above modify is not even needed to state the case";
svn rm trunk/file1; svn ci trunk -m "creating (conflicting) delete on trunk";
cd branches/f1; svn merge svn+ssh://repos/trunk .
[ -f file1 ] && echo "file f1 does exist while it should have been deleted by merge.";

因此,即使我正在主动删除文件的主干中合并,该文件仍存在于我的工作副本中.非常意外.就我而言,我什至没有对文件进行任何更改,这是我想到svn为什么会保存文件的唯一原因.

So, the file still exists in my working copy even though I'm merging in trunk where the file has been actively deleted. Highly unexpected. In my case I haven't even made any changes to the file, which is the only reason i can think of why svn would save the file.

推荐答案

据我所知,您所做的就是在file1中创建本地冲突.在您的分支中,它已被修改.在您的行李箱中,它已被删除.合并时会发生冲突.因此文件仍然存在.

To the best of my understanding, what you've done is create a local conflict in file1. In your branch, it was modified. In your trunk, it was deleted. When you merge, it will be in conflict. So the file will still be around.

我建议进行2种测试:

  1. 运行上面的代码后, 包括svn status的结果.
  2. 尝试使用与上面相同的代码,但是 而不修改该分支 全部. (svn status会有所帮助 也在这里.)
  1. After running the code above, include the results of svn status.
  2. Try the same code as above, but without modifying that branch at all. (svn status would be helpful here as well.)

这篇关于颠覆合并删除命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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