Question: what does hg rebase do?
Answer: Rebase allows moving commits around in Mercurial's history (using a series of internal merges). This has many uses: moving changesets between branches. "linearizing" history.