Differences between revisions 7 and 8
Revision 7 as of 2010-11-30 12:10:01
Size: 4085
Comment: updated docstrings/help texts
Revision 8 as of 2013-08-27 19:37:50
Size: 421
Editor: AhmadThor
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Contains extension ==

'''This extension is not distributed with Mercurial.'''

''Author: Christoph Rissner <cr@visotech.at>''

Repository: 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 child] [-t] [--revno] rev

tests whether a changeset is parent to another one

    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
    using the extra data set by the transplant command (which means the
    transplant sources must be in the same repo).

    If 'revno' is given the 'child' and 'rev' 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:

 -c --child check relationship to the given child changeset
 -t --transplants check transplanted changesets
    --revno interpret arguments as revision number (no pattern magic)
}}}

To find all heads containing a specific changeset use:
{{{
hg headscontaining [-t] [--revno] 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
    --revno interpret argument as revision number (no pattern magic)
    --style STYLE display using template map file
    --template TEMPLATE display with template
}}}

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 [-M] [-t] [--revno] [--no-tags] 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
    --revno interpret arguments as revision number (no pattern magic)
 -M --no-merges do not show merges
    --no-tags ignore changesets that only touch .hgtags
    --style STYLE display using template map file
    --template TEMPLATE display with template
}}}
----
CategoryExtensionsByOthers
Its writer's name is Emery Lavine. For years he's gone living in Massachusetts.<<BR>>
<<BR>>
For years he can be been working as a powerful administrative assistant and salary has been fairly fulfilling. He is totally fond of to proceed to to ballet and right now he is trying to help earn money with the concept. He is running and cut a blog here: http://linksdebatte.de/index.php/Might_Raspberry_Ketone_Weight_Loss

Its writer's name is Emery Lavine. For years he's gone living in Massachusetts.

For years he can be been working as a powerful administrative assistant and salary has been fairly fulfilling. He is totally fond of to proceed to to ballet and right now he is trying to help earn money with the concept. He is running and cut a blog here: http://linksdebatte.de/index.php/Might_Raspberry_Ketone_Weight_Loss

ContainsExtension (last edited 2017-04-20 19:17:11 by Carlo DiCelico)