hg: Commit some changes to another branch
I was working in branch-a when I found an unrelated bug that should be
fixed in the default branch. So, I'd like commit some of my changes to
default, then merge default into the current branch, and keep working.
As far as I know, Mercurial doesn't allow committing directly into another
branch, so I would have to switch to the default branch first. The problem
is, I can't simply checkout the default branch, because the other changes
would cause conflicts. One workflow I can think of is to shelve, checkout
default, unshelve only the files that relate to the fix, commit, checkout
branch-a, merge default, and finally, unshelve the rest of the files. Is
there an easier way to accomplish this?
No comments:
Post a Comment