Reorder patch reversion and hg update. This looks more reasonable.