A Scalable, User-Friendly Source Control System.
Go to file
Angel Ezquerra bfc07420f3 revset: add "matching" keyword
This keyword can be used to find revisions that "match" one or more fields of a
given set of revisions.

A revision matches another if all the selected fields (description, author,
branch, date, files, phase, parents, substate, user, summary and/or metadata)
match the corresponding values of those fields on the source revision.

By default this keyword looks for revisions that whose metadata match
(description, author and date) making it ideal to look for duplicate revisions.

matching takes 2 arguments (the second being optional):

1.- rev: a revset represeting a _single_ revision (e.g. tip, ., p1(.), etc)
2.- [field(s) to match]: an optional string containing the field or fields
(separated by spaces) to match.
    Valid fields are most regular context fields and some special fields:
    * regular fields:
      - description, author, branch, date, files, phase, parents,
      substate, user.
      Note that author and user are synonyms.
    * special fields: summary, metadata.
      - summary: matches the first line of the description.
      - metatadata: It is equivalent to matching 'description user date'
        (i.e. it matches the main metadata fields).

Examples:

1.- Look for revisions with the same metadata (author, description and date)
as the 11th revision:

hg log -r "matching(11)"

2.- Look for revisions with the same description as the 11th revision:

hg log -r "matching(11, description)"

3.- Look for revisions with the same 'summary' (i.e. same first line on their
description) as the 11th revision:

hg log -r "matching(11, summary)"

4.- Look for revisions with the same author as the current revision:

hg log -r "matching(., author)"

You could use 'user' rather than 'author' to get the same result.

5.- Look for revisions with the same description _AND_ author as the tip of the
repository:

hg log -r "matching(tip, 'author description')"

6.- Look for revisions touching the same files as the parent of the tip of the
repository

hg log -r "matching(p1(tip), files)"

7.- Look for revisions whose subrepos are on the same state as the tip of the
repository or its parent

hg log -r "matching(p1(tip):tip, substate)"

8.- Look for revisions whose author and subrepo states both match those of any
of the revisions on the stable branch:

hg log -r "matching(branch(stable), 'author substate')"
2012-04-01 14:12:14 +02:00
contrib plan9: add execute permissions to 9diff 2012-04-10 23:40:20 -07:00
doc Describe all files related to the standard commands. 2011-12-06 15:50:28 +01:00
hgext transplant: permit merge changesets via --parent 2012-04-10 23:24:12 -07:00
i18n merge with stable 2012-03-30 14:35:06 -05:00
mercurial revset: add "matching" keyword 2012-04-01 14:12:14 +02:00
tests transplant: permit merge changesets via --parent 2012-04-10 23:24:12 -07:00
.hgignore tests: add htmlcov option 2012-01-11 15:38:31 +01:00
.hgsigs Added signature for changeset bf3e6b163ba4 2012-04-01 15:31:07 -05:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
hg rename util.set_binary to setbinary 2011-05-06 15:25:35 +02:00
hgeditor Fixed a bashism with the use of $RANDOM in hgeditor. 2010-05-19 18:06:35 +02:00
hgweb.cgi mq: add a warning about uncommitted changes for qfinish 2011-11-10 15:40:34 -06:00
Makefile filemerge: create detail of internal merge tools from documentation string 2012-02-12 21:38:12 +09:00
README readme: mention how to run in-place 2012-03-02 21:43:55 +02:00
setup.py plan9: initial support for plan 9 from bell labs 2012-04-08 12:43:41 -07:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing:

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See http://mercurial.selenic.com/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.