TortoiseHG 将本地合并到分支头

发布于 2024-12-08 21:57:05 字数 425 浏览 0 评论 0原文

我在 TortoiseHG 中有一个带有单个分支的存储库(下一个版本开发),但对本地进行了修改(错误修复)...类似...

Local 0-------3--4
       \
Branch  1--2

我想在分支版本上进行更多开发,但随后进行了本地更改融入其中。我想将本地版本保留在可以继续开发而无需更改分支的状态。

我不确定我所要求的是否真的可能,或者来自 Visual SourceSafe 环境是否只是使我无法看到应该显而易见的东西。

事实上,再多考虑一下(正如我在写上面的内容时),我想知道我的方法是否是错误的。我可能应该继续本地版本中的未来开发,然后创建一个错误修复分支,我可以将其合并回本地版本。

所以问题是,有没有办法解决我想要对当前存储库设置执行的操作,或者我应该导出单独的修订并从头开始重建存储库? (或者还有其他选择吗?)

I have a repo in TortoiseHG with a single branch (next version development), but modifications to the local (bug fixes)... something like...

Local 0-------3--4
       \
Branch  1--2

I want to do some more development on the branch version but with the subsequent Local changes merged into it. And I want to leave the local version in a state where I can continue development without the branch changed.

I'm not sure if what I'm asking is actually possible, or whether coming from a Visual SourceSafe environment is just clouding my ability to see something that should be obvious.

In fact, thinking about it a bit more (as I was writing the above) I'm wondering if my approach is the wrong way around. I should probably have continued with the future development in the local version and then create a bug-fix branch that I could have merged back into local one.

So the question is, is there a way to get around what I want to do with the current repo setup, or should I export the individual revisions and rebuild the repo from scratch? (Or any other options?)

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

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

发布评论

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

评论(1

傲性难收 2024-12-15 21:57:07

对我来说,这似乎是很正常的 Mercurial 处理方式。

您有:

  1. 两个分支
  2. 想要确保两个分支中的一个拥有另一个分支的所有更新
  3. 想要确保另一个分支还没有第一个分支的任何更新

您基本上只需合并 Local 定期分支到 Branch 分支,但反之则不然。

每当您合并到一个分支时,您首先会更新到该分支的头部。这使得您提交的变更集也将在该分支上合并。

换句话说,您可以这样做:

  1. 更新到 Branch 的头部
  2. 右键单击​​ Local 的头部,然后选择“与本地合并...”并执行通过合并
  3. 提交,这个新的变更集最终会出现在 Branch 分支上

Local 分支仍然完全不知道 上的更改>分支分支。

This seems like pretty normal Mercurial handling to me.

You have:

  1. Two branches
  2. Want to make sure one of the two branches have all the updates of the other
  3. Want to make sure that other branch does not have any of the updates from the first (yet)

You basically just have to merge the Local branch into the Branch branch at regular intervals, but not the other way around.

Whenever you merge to a branch, you first update to the head of that branch. This makes the changeset you commit to persist that merge be on that branch as well.

In other words, you would do this:

  1. Update to the head of Branch
  2. Right-click on the head of Local and select "Merge with local..." and go through with the merge
  3. Commit, this new changeset ends up being on the Branch branch

The Local branch is still blissfully unaware of the changes on the Branch branch.

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