templatekw: add parent1, parent1node, parent2, parent2node keywords

The {parents} template is cumbersome for some uses, as it does not show
anything if there's only one "natural" parent and you can't use it to get the
full 40 digit node hashes for parents unless you rely on the behavior of
the --debug flag.

Introduce four new template keywords: {parent1}, {parent2}, {parent1node} and
{parent2node}. The "node" flavors of these always show full 40 digit hashes,
but users can get the short version with a filter construction like
'{parent1node|short}'.
Merge with crew-stable
templatekw: add p1rev, p1node, p2rev, p2node keywords

The {parents} template is cumbersome for some uses, as it does not show
anything if there's only one "natural" parent and you can't use it to get the
full 40 digit node hashes for parents unless you rely on the behavior of
the --debug flag.

Introduce four new template keywords: {p1rev}, {p2rev}, {p1node} and
{p2node}. The "node" flavors of these always show full 40 digit hashes,
but users can get the short version with a filter construction like
'{p1node|short}'.
revlog: don't try to partialmatch strings those length > 40

_partialmatch() does prefix matching against nodes. String passed
to _partialmetch() actualy may be any string, not prefix only.

For example,
"e410be8603932e46a51298748a4b874739037fad or 300" is a good
argument for _partialmatch().

When _partialmatch() searches using radix tree, index_partialmatch()
C function shouldn't try to match too long strings.

--HG--
branch : stable
i18n-ru: synchronized with c6f88e7f95b7
parsers: fix an integer size warning issued by clang
templatekw: merge, preferring the second implementation
Merge
rollback: write dirstate branch with correct encoding

--HG--
branch : stable
merge with stable
tests: test filesets with test-fileset.t

--HG--
branch : stable
fileset: actually implement 'minusset'

  $ hg debugfileset 'a* - a1'

was tracing back because 'minus' symbol was not supported.

--HG--
branch : stable
test-fileset: test file status predicates

--HG--
branch : stable
extra : rebase_source : 9f252ccb56c791b1f9544a64645dce91827ae8f8
fileset: exclude deleted files from matchctx.existing()

Running:

  $ hg debugfileset 'binary()'

would traceback if there were one deleted file in the working directory.
It happened because matchctx.existing() was filtering files against the
ctx.__contains__() but deleted files are still considered part of
workingctx.

--HG--
branch : stable
fileset: matchctx.existing() must consider unknown files

By default, unknown files are ignored. If the 'unknown()' predicate
appears in the syntax tree, then they are taken in account.
Unfortunately, matchctx.existing() was filtering against non-deleted
context files, which does not include unknown files. So:

  $ hg debugfileset 'binary() and unknown()'

would not return existing binary unknown files.

--HG--
branch : stable
fileset: matchctx.existing() must consider ignored files

When running:

  $ hg debugfileset 'binary() and ignored()'

getfileset() was correctly retrieving ignored files but
matchctx.existing() was not taking them in account. Just add them along
with unknown files.

--HG--
branch : stable
fileset: do not traceback on invalid grep pattern

--HG--
branch : stable
extra : rebase_source : a1bc00aa643f563ae90b3fa1a08ffb5948a0440f
test-fileset: test remaining predicates

- exec
- symlink
- size
- resolved / unresolved
- subrepo

--HG--
branch : stable
extra : rebase_source : aec9e7bb603ddf1c9521c82d963577f5ced68dbc
debugfileset: implement --rev, more tests

--HG--
branch : stable
extra : rebase_source : 59679781bc13c84af2437d6c9d0c5902fc1ed107
fileset: fix generator vs list bug in fast path

  $ hg debugfileset 'a or b'

would only return a or b but not both because the base file list was a
generator instead of a replayable sequence.

--HG--
branch : stable