Revision Argument Plan

Main proponents: Martin von Zweigbergk

Current state

Many commands accept a --rev argument. There are different categories of what they're used for, as the following sub-sections will detail.

Commands that default to the working copy

These commands default to the working copy but allow the user to pass a --rev to work on a different commit. They treat the working copy the same as that other commit.

Commands that default to the working copy's parent

These commands default to the working copy parent. Some of them allow --rev 'wdir()'.

I haven't listed hg rebase here, because even though it has a --rev option, it defaults to the --base option.

Commands that work on two commits

These commands use --rev to specify two commits, but they're used differently. That was a mistake in my opinion.

Commands that currently work on the working copy

hg branch doesn't quite qualify for this list because it doesn't (yet) accept --rev.

Commands that cannot work on the working copy

These commands are not very interesting for the discussion, but I've added them here for completeness.

Others

Future plans