Best way to remove a past merged-in changeset

I’m going to strip out the merge of database encryption so that I can
get my EWL up to date. What is the best way to revert merging a head
from a long time ago? Here’s what I think:

  • Strip it
  • Surefire way for that head not to be merged in
    • However, I will have to remerge everything that has ever come after it
  • Backout
  • Never done this before
  • Not exactly sure how there won’t be a merge conflict where I’ll basically
    have to hand-edit what the code should be without the changeset
  • How does Hg know later that this feature isn’t applied? How does it
    not look through the past and say “yup this has been merged before” even
    though later it was unapplied?

Your last bullet point under Backout is a great point, and probably eliminates it as an option. There’d be no way to re-merge the branch in the future, since Mercurial would tell you that it’s already an ancestor of the head you’re trying to merge it into.

You may want to Google around for backing out a bad merge with Mercurial. I remember seeing a few discussions about that.