无法将新文件从主干合并到我的分支

发布于 2024-08-26 12:38:59 字数 759 浏览 8 评论 0原文

这是我的步骤:

  1. 从主干切换到我的分支
  2. 执行从主干子目录到我的分支子目录的合并,即 svn merge https:.../trunk/Class@2209 https:...branches/mybranch/Class@HEAD /Users/me/.../Class

我得到的响应: --- 将存储库 URL 之间的差异合并到“/Users/me/.../Class”中: C /Users/me/.../Class/NewFileYouDoNotHave.php 冲突总结: 树冲突: 1

修订版 2209 与 NewFileYouDoNotHave.php 添加到主干的修订版相同。我知道我想要以前的版本。但是,之前的主干版本比分支的最新版本要旧。 (所以我猜有人更新了分支并且没有包含我的文件)。

为了纠正这个问题,我读到冲突可能源于 svn 对哪些文件位于哪个版本中的混淆。所以我删除了NewFileYouDoNotHave.php并将其提交到主干。然后添加它并将其提交回主干。我切换到我的分支并再次执行合并,但我仍然得到相同的结果。

根据我上周的经验,我知道如果我切换回主干(现在我在分支中),Subclipse 将断开与 svn 的连接。我将不再能够访问 Team 菜单项并通过 Subclipse GUI 执行 svn 命令,但我仍然能够在终端中运行 svn 命令。

技能:菜鸟
SVN:svn,版本 1.6.5 (r38866)
Subclipse: 1.0.6

我真的很感激任何建议、见解等!

Here are my steps:

  1. switch from trunk to my branch
  2. perform a merge from a trunks subdirectory to my branch subdirectory, i.e.
    svn merge https:.../trunk/Class@2209 https:...branches/mybranch/Class@HEAD /Users/me/.../Class

The response I get:
--- Merging differences between repository URLs into '/Users/me/.../Class':
C /Users/me/.../Class/NewFileYouDoNotHave.php
Summary of conflicts:
Tree conflicts: 1

Revision 2209 is the same revision that NewFileYouDoNotHave.php was added to the trunk. I understand that I want the previous version. However, the previous trunk revision is older than the branches latest revision. (so i guess someone updated the branch and didn't include my file).

To correct this I read that the conflict probably originates from svn's confusion on which files are in which revision. So I deleted NewFileYouDoNotHave.php and committed it to trunk. Then added it and committed it back into trunk. I switched to my branch and performed the merge again, but I'm still getting the same results.

From my experience this previous week, I know that if I switch back to trunk (right now i'm in the branch) that Subclipse will drop the connection to svn. I will no longer be able to access the Team menu item and perform svn commands through the Subclipse GUI but I will still be able to run svn commands in terminal.

Skill:noob
SVN: svn, version 1.6.5 (r38866)
Subclipse: 1.0.6

I would really appreciate any advice, insights, etc. !!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初相遇 2024-09-02 12:38:59

合并时你需要在你想要合并到的代码库的工作副本(分支)中,然后从Trunk版本2209合并到Trunk Head到你的工作副本。

换句话说,您将从 v:2209 到主干代码头部的更改合并到您的分支。

[编辑]
合并时,您应该记住您合并的代码是一个分支的一系列更改。因此,您希望从分支中将主干中的 2209 更改为 2221。选择分支作为工作副本,从 Trunk @ 2209 合并并合并到 Trunk 2221。这将获取主干中 2209 到 2221 的更改,并将它们合并到作为工作副本的分支中。

When merging you need to be in the working copy of the code base you want to merge to (Branch) Then merge from the Trunk version 2209 to Trunk Head to your working copy.

in other word you are merging in changes from v:2209 to the head of the trunk code to your branch.

[EDIT]
When merging you should remember the code you merge is a range of changes from one branch. so from the Branch you want changes from 2209 to 2221 in the trunk. Select the branch as the working copy, merge from Trunk @ 2209 and merge to Trunk 2221. This will grab changes 2209 to 2221 in the trunk and merge them into the Branch that is your working copy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文