Refer to a mercurial revision relative to a named revision
问题 In git, you can do refer to revisions by something like master^^ , meaning two revisions before master. Can you do the same in Mercurial in some way (or with some extension)? For example, if I want to do "the revision before tip", something like tip^ . edit: Rafa mentions hg parents which works for 1 level deep. How do I do it for arbitrary levels deep. 回答1: For commands that have options to specify a revision, use -r -2 for the revision prior to the tip, -r -3 for the revision before that,