Differences between revisions 10 and 20 (spanning 10 versions)
Revision 10 as of 2008-05-13 17:46:36
Size: 1355
Editor: abuehl
Comment: adding notes about cmd.exe on Windows
Revision 20 as of 2013-10-08 01:16:30
Size: 1399
Comment: Revert vandalism / spam
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Parentrevspec Extension == #pragma section-numbers 2
= Parentrevspec Extension =
Line 3: Line 4:
'''This extension is currently being distributed along with Mercurial.''' /!\ This extension is deprecated. See [[Topic:revsets|revsets]].
Line 7: Line 8:
=== Overview === <<TableOfContents(3)>>
== Overview ==
Line 19: Line 21:
2. `foo~N` = Nth first grandparent of `foo` 2. `foo~N` = Nth first ancestor of `foo`
Line 26: Line 28:
=== Configuration ===
Configure your .hgrc to enable the extension by adding the following lines:
== Configuration ==
Configure your ''`.hgrc`'' to enable the extension by adding the following lines:
Line 34: Line 36:
=== Notes === == Notes ==
Line 36: Line 38:
==== Using cmd.exe on Windows ==== === Using cmd.exe on Windows ===
Line 38: Line 40:
Character `^` is interpreted as an escape character by cmd.exe on Windows. So, if you want Character `^` is interpreted as an escape character by `cmd.exe` on Windows. So, if you want
Line 51: Line 53:
If you happen to ignore that, cmd.exe will give you a funny "More?" If you happen to ignore that, `cmd.exe` will give you a funny "More?"
Line 57: Line 59:
Line 59: Line 60:
CategoryExtension CategoryBundledExtension

Parentrevspec Extension

/!\ This extension is deprecated. See revsets.

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 ancestor 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 =

3. Notes

3.1. Using cmd.exe on Windows

Character ^ is interpreted as an escape character by cmd.exe on Windows. So, if you want to get a single ^ through to hg you have to enter something like

> hg log -r.^^

which counts as a single ^ or

> hg log -r."^"

If you happen to ignore that, cmd.exe will give you a funny "More?"

> hg log -r.^
More?


CategoryBundledExtension

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