We were doing it this way:
- move working copy (repo.setparents)
- add obsmarkers (scmutil.cleanupnodes)
- fix dirstate (dirstate.normal/drop)
Step 1 and 3 are closely related, so let's move them together. It
seems safest to create the obsmarkers last. This patch thus makes the
order 1, 3, 2.