revset: document the regular expression support for tag(name)

This has been supported since 20f55613fb2a, in 2.3.

--HG--
branch : stable
hg: use "os.path.join()" to join path components which may be empty (issue4203)

Changset 2d0ab571b822 rewriting "hg.copystore()" with vfs uses
'dstbase + "/lock"' instead of "os.path.join()", because target files
given from "store.copyfiles()" already uses "/" as path separator

But in the repository using revlog format 0, "dstbase" becomes empty
("data" directory is located under ".hg" directly), and 'dstbase +
"/lock"' is treated as "/lock": in almost all cases, write access to
"/lock" causes "permission denied".

This patch uses "os.path.join()" to join path components which may be
empty in "hg.copystore()".

--HG--
branch : stable
dispatch: only do __import__(debugger) when a debugger is requested

When having ui.debugger=somedebugger in one's ~/.hgrc, this then
somedebugger would be imported for every hg command. With this patch,
this import only happens if the --debugger parameter is passed.

--HG--
branch : stable
extra : rebase_source : 1b72ba0a6e8cc9dfc7f1d940d997b6fb854432fa
localrepo: omit ".hgsubstate" also from "added" files

Before this patch, "localrepository.commit()" omits ".hgsubstate" from
"modified" (changes[0]) and "removed" (changes[2]) file list before
checking subrepositories, but leaves one in "added" (changes[1]) as it
is.

Then, "localrepository.commit()" adds ".hgsubstate" into "modified" or
"removed" list forcibly, according to subrepository statuses.

If "added" contains ".hgsubstate", the committed context will contain
two ".hgsubstate" in its "files": one from "added" (not omitted one),
and another from "modified" or "removed" (newly added one).

How many times ".hgsubstate" appears in "files" changes node hash,
even though revision content is same, because node hash calculation
uses the specified "files" directly (without duplication check or so).

This means that node hash of committed revision changes according to
existence of ".hgsubstate" in "added" at "localrepository.commit()".

".hgsubstate" is treated as "added", not only in accidental cases, but
also in the case of "qpush" for the patch adding ".hgsubstate".

This patch omits ".hgsubstate" also from "added" files before checking
subrepositories. This patch also omits ".hgsubstate" exclusion in
"qnew"/"qrefresh" introduced by changeset d666da075b91, because this
patch makes them meaningless.

"hg parents --template '{files}\n'" newly added to "test-mq-subrepo.t"
enhances checking unexpected multiple appearances of ".hgsubstate" in
"files" of created/refreshed MQ revisions.
revset: improve performance of _generatorset.__contains__ (issue 4201)

_generatorset.__contains__ and __contains__ from child classes were
calling into __iter__ to look for values. Since all
previously-encountered values from the generator were cached and checked
in __contains__ before this iteration, __contains__ was effectively
performing iteration busy work which could lead to an explosion of
redundant work.

This patch changes __contains__ to be more intelligent. Instead of
looking at all values via __iter__, __contains__ will instead go
straight to "new" values from the underlying generator.

On a clone of the Firefox repository with around 200,000 changesets,
this patch decreases the execution time of the revset '::(200067)::'
from ~100s to ~4s on the author's machine. Rebase operations (which use
the aforementioned revset), speed up accordingly.

--HG--
extra : rebase_source : 2a543208b422958e33e851bd7f8e0b324bed94e2
merge with stable

--HG--
extra : amend_source : fff52879cac7d7675c6f567f8f7306026c5bfbf0