BitBucket + hg + branch merges

Ever have to update/merge a PR on BitBucket with Mercurial? I couldn’t find documentation anywhere, so doing so here:

  1. hg up BOOKMARK_NAME
  2. hg merge [–preview] -r REV
  3. If EDITOR is not set:
    export EDITOR=vim
  4. hg resolve –all
  5. hg commit -m “Merge with default”
  6. hg push –allow-anon