将推送的命名分支与默认分支合并会导致错误

发布于 2024-12-28 07:18:01 字数 653 浏览 1 评论 0原文

我使用 Mercurial Eclipse 插件 20111225_Content_Build 创建了一个命名分支,在本地提交此分支后,我将其推送到我的 bitbucket 存储库,而没有先与 default 合并。现在我有了默认分支(非活动)和我的命名分支 20111225_Content_Build(活动)。我尝试按照以下步骤合并这两个:

hg update default

这给了我一个错误:abort:工作目录中未跟踪的文件与请求修订中的文件不同:'target/m2e-wtp/web-resources/META-INF/maven/ org.bixin.dugsi/Dugsi_Manager/pom.xml'

然后当我尝试合并时: hg merge 20111225_Content_Build 我收到一条错误,指出我无法与工作目录合并?

abort: merging with a working directory ancestor has no effect

我确实有几个生成的 target/ 文件尚未提交或推送,我是否需要推送这些文件才能合并这两个分支?

I created a named branch using the mercurial eclipse plugin 20111225_Content_Build and after committing this branch locally, i pushed to my bitbucket repository without first merging with default. Now i have the default (inactive) and my named branch 20111225_Content_Build (active). I tried to merge these two following these steps:

hg update default

This gives me an error: abort: untracked file in working directory differs from file in requested revision: 'target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml'

and then when i try to merge: hg merge 20111225_Content_Build i get an error stating that i cannot merge with a working directory?

abort: merging with a working directory ancestor has no effect

I do have several generated target/ files that have not been committed or pushed, do i need to push these files in order to merge these two branches?

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

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

发布评论

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

评论(1

百合的盛世恋 2025-01-04 07:18:01

更新时的消息告诉您您的 pom.xml 文件未添加到您的分支中,但默认添加。因此,当您 hg update default 时,Mercurial 需要放弃 pom.xml 文件中的更改,并用 default 中签入的版本覆盖它code>,但 Mercurial 总是拒绝丢弃数据,除非您真的非常坚持。

您有两个简单的选择:

如果您想保留对分支中的 pom.xml 所做的更改,并将它们合并到存储在 < code>default 分支,然后执行以下操作:

  • hg add target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml
  • hg commit target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml

如果(相反)您想放弃对分支中的 pom.xml 然后只需执行以下操作:

  • rm target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml

在其中任一操作之后,您将能够执行以下操作:

  • hg update default
  • hg合并20111225_Content_Build

The message when you update is telling you your pom.xml files is not added in your branch, but is added in default. So when you hg update default Mercurial would need to discard the changes in your pom.xml file and overwrite it with the version that's checked-in in default, but Mercurial always refused to throw away data unless you really, really insist.

You've got two easy options:

If you want to keep the changes you made to pom.xml in the branch and merge them into the pom.xml stored in the default branch then you do this:

  • hg add target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml
  • hg commit target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml

If (instead) you want to discard the changes to pom.xml in the branch then just do this:

  • rm target/m2e-wtp/web-resources/META-INF/maven/org.bixin.dugsi/Dugsi_Manager/pom.xml

After either one of those you'll be able to do:

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