TortoiseHG 将本地合并到分支头
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,这似乎是很正常的 Mercurial 处理方式。
您有:
您基本上只需合并
Local
定期分支到Branch
分支,但反之则不然。每当您合并到一个分支时,您首先会更新到该分支的头部。这使得您提交的变更集也将在该分支上合并。
换句话说,您可以这样做:
Branch
的头部Local
的头部,然后选择“与本地合并...”并执行通过合并Branch
分支上Local
分支仍然完全不知道上的更改>分支
分支。This seems like pretty normal Mercurial handling to me.
You have:
You basically just have to merge the
Local
branch into theBranch
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:
Branch
Local
and select "Merge with local..." and go through with the mergeBranch
branchThe
Local
branch is still blissfully unaware of the changes on theBranch
branch.