util: create bytecount array just once

This avoids tons of gettext calls on workloads that call bytecount a lot.
stream_in: avoid debug calls when debug is disabled
help: fix indentation on cacert (issue3350)

The parser doesn't really handle nesting, so reorder so the nested bit
is last.
transplant: permit merge changesets via --parent

This change permits the transplant extension to operate on merge
changesets by way of --parent.  This is particularly useful for
workflows which cherrypick branch merges rather than each commit
within a branch.
plan9: add execute permissions to 9diff
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')"
tests: fix shutdown race in test-bad-pull

--HG--
branch : stable
Added tag 2.1.2 for changeset b9bd95e61b49

--HG--
branch : stable
Added signature for changeset b9bd95e61b49

--HG--
branch : stable
tests: really add blacklist for vfat on Linux

--HG--
branch : stable
tests: re-silence test-bad-pull log messages

--HG--
branch : stable
tests: make test-hup more race-proof

We need to wait until a journal exists AND is non-empty before
aborting a transaction to get stable output. We move the kill wait
outside the fifo block to avoid potential deadlock.

--HG--
branch : stable
tests: avoid zombie lockup with test-hup

The 'while kill -0' recipe can cause a livelock if the process we're waiting
to die is a normal child process. If it becomes a zombie that the shell
doesn't reap (shell bug?), it will continue to be able to accept
signals. So instead, we just wait(1).

--HG--
branch : stable
tests: don't run test-gpg if not in a working directory

test-gpg has to be run in a mercurial working directory as it uses
that to verify that it hasn't modified the trustdb.gpg file.  Skip the
test if it is running in an exploded tarball.

--HG--
branch : stable
test-gpg: replace 825565136235 by md5sum check

The call to 'hg identify' would have needed '--cwd "$TESTDIR' to make it work
anyway, but by using a checksum this test can work outside a repository.

--HG--
branch : stable
tests: make tests work if directory contains special characters

With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".

--HG--
branch : stable
clone: always close source repository (issue2491)

This is especially needed for cloning from bundles as a temporary
bundlerepository is created which needs to be deleted after clone has
finished.

--HG--
branch : stable
inotify: catch SignalInterrupt during shutdown (issue3351)

When inotify.repowatcher.shutdown() is called, mercurial.error.SignalInterrupt
exception is thrown by mercurial.dispatch._runcatch.catchterm(), therefore
socketlistener.shutdown() is not called.

Catching this allows cleanup action (removing the socket file) to proceed.

--HG--
branch : stable
test-merge-types: allow different output with existing hgmerge (issue3346)

Because hgmerge was meant to be adjusted to personal needs, there may be
many remaining copies in people's $PATH.

--HG--
branch : stable
export: catch exporting empty revsets (issue3353)

Additionally add tests for empty revsets and unknown revisions.

--HG--
branch : stable