In Git I can do this:
1. Start working on new feature: $ git co -b newfeature-123 # (a local feature development branch) do a few commits (M, N, O) master A---B
Assuming you have a modern Hg installation, you can simply add:
[extensions] rebase =
to ~/.hgrc.
Then you can use the commands hg rebase, hg pull --rebase, or hg help rebase.
hg rebase
hg pull --rebase
hg help rebase