In git it’s quite convenient to identify a commit relative to the latest commit in the repo with HEAD~1.
I have searched and cannot find an equivalent for this in mercurial. I find mercurials revision numbers rather annoying.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a mercurial extension that adds git like commands.
Specific command is
hg log -pr .^1.For extra information, see examining a changeset in hg
Edit: Use
.^1, nottip^1. As mentioned below,tipgives the most recent commit in the entire repo, which is possibly not what you want. The.is closer in meaning to git’sHEAD. (See also: Specify dot as a revision in Mercurial)