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.
hg annotate
hg files
hg grep
hg identify
hg parents (deprecated)
hg topic (from the topic extension)
Commands that default to the working copy's parent
These commands default to the working copy parent. Some of them allow --rev 'wdir()'.
hg cat (allows `--rev 'wdir()')
hg phase
hg log (kind of, it defaults to all revisions, but not including wdir() and null)
hg manifest (allows `--rev 'wdir()')
hg revert
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.
hg status --rev X --rev Y
hg diff --rev X --rev Y
Commands that currently work on the working copy
hg absorb
hg add
hg copy
hg forget
hg rename
hg remove
hg resolve
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.
hg bisect [--good|--bad]
hg bookmarks
hg bundle
hg outgoing
hg pull
hg push
hg tag
Others
hg status --change X
This one makes --change X work like regular diff for the working copy (i.e. hg status --change 'wdir()' is effectively the default)