Examining a changeset in HG

Your question has two parts. First, how to get the metadata and diff for a changeset all at once:

hg log --patch --rev tip

You can shorten the options:

hg log -pr tip

The second part of the question is how to say "the parent changeset of X" without looking it up. For that you can use the parentrevspec extension Martin mentioned.

Once you enable the extension you can do:

hg log -pr tip^

You could add an alias to your ~/.hgrc file if you don't want to retrain your fingers from git's command:

[alias]
show = log -pr

Then you could use:

hg show tip^

I think you want hg export cset.

Tags:

Git

Mercurial