Differences between revisions 8 and 9
Revision 8 as of 2008-02-22 23:58:23
Size: 967
Comment: parentrevspec is now part of mercurial
Revision 9 as of 2008-05-12 17:13:05
Size: 941
Editor: abuehl
Comment: since it is distributed along with Mercurial, parentrevspec = will do
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
parentrevspec = /path/to/parentrevspec.py parentrevspec =

Parentrevspec Extension

This extension is currently being distributed along with Mercurial.

Author: Alexis S. L. Carvalho

1. Overview

This extension allows you to use git-style suffixes to refer to the ancestors of a specific revision.

For example, if you can refer to a revision as foo, then:

1. foo^N = Nth parent of foo:

  • foo^0 = foo

  • foo^1 = first parent of foo

  • foo^2 = second parent of foo

  • foo^ = foo^1

2. foo~N = Nth first grandparent of foo

  • foo~0 = foo

  • foo~1 = foo^1 = foo^ = first parent of foo

  • foo~2 = foo^1^1 = foo^^ = first parent of first parent of foo

So hg log -r tip^^ or hg log -r tip~2 will display the grandparent of tip.

2. Configuration

Configure your .hgrc to enable the extension by adding the following lines:

[extensions]
parentrevspec =


CategoryExtension

ParentrevspecExtension (last edited 2013-10-08 01:16:30 by Matthew Gabeler-Lee)