TortoiseHG merging local into branch head
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 So开发者_C百科urceSafe 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?)
This seems like pretty normal Mercurial handling to me.
You have:
- Two branches
- Want to make sure one of the two branches have all the updates of the other
- 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:
- Update to the head of
Branch
- Right-click on the head of
Local
and select "Merge with local..." and go through with the merge - 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.
精彩评论