Contains extension

This extension is not distributed with Mercurial.

Author: Christoph Rissner <cr@visotech.at>

Extension site: http://bitbucket.org/resi/hg-contains/

Overview

This extension provides a contains command to test whether a changeset is a parent to another one. This can be used to test whether some changeset is contained in a branch or not. There is an option to look for transplanted changesets as well.

Configuration

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

[extensions]
hgcontains=/path/to/contains.py

(with the actual path to your file, of course)

Usage

list of commands:

 contains          tests whether a changeset is parent to another one
 headscontaining   finds heads containing a specific changeset
 missing           finds changesets missing in a branch

To test whether a changeset is parent to another one

hg contains [-c childrev] [-t] rev

    This command tests whether the changeset given in 'rev' is a parent to
    the changeset given in 'child'. If no 'child' revision is given, the
    current working directory is used.

    If 'transplants' is given transplanted changesets are followed as well.

options:

 -c --child        check relationship to the given child changeset
 -t --transplants  check transplanted changesets

To find all heads containing a specific changeset use:

hg headscontaining [-t] [-r] rev

finds heads containing a specific changeset

    This command shows all heads containing the changeset given in 'rev'.
    If 'transplants' is given transplanted changesets are followed as well.

    If 'revno' is given the 'rev' argument is interpreted as revision
    number to prevent false positives due to pattern matching.
    You can use hashes instead of revision numbers to prevent pattern matching
    on the revision.

options:

 -t --transplants  check transplanted changesets
 -r --revno        interpret argument as revision number (no pattern magic)

When working with several branches (say a development and a release branch) it may be interesting to see which changesets present in one branch are missing in the other (lets say you are looking for bugfixes and don't remember whether you've transplanted them or not):

hg missing [-t] [-r] target source

finds changesets missing in a branch

    This command reports all changesets present in 'source' but not in
    'target'.
    If 'transplants' is given transplanted changesets are considered as well.
    If a changeset is transplanted repeatedly (x -> x' -> x'') the transplanted
    nodes x' and x'' are not considered but only the original changeset x.

    If 'revno' is given the 'target' and 'source' arguments are interpreted as
    revision numbers to prevent false positives due to pattern matching.
    You can use hashes instead of revision numbers to prevent pattern matching
    on the revision.

options:

 -t --transplants  check transplanted changesets
 -r --revno        interpret arguments as revision number (no pattern magic)


CategoryExtensionsByOthers