subrepo: add argument to "diff()" to pass "ui" of caller side (issue3712) (API)

Color extension achieves colorization by overriding the class of
"ui" object just before command execution.

Before this patch, "diff()" of abstractsubrepo and classes
derived from it has no "ui" argument, so "diff()" of hgsubrepo
uses "self._repo.ui" to invoke "cmdutil.diffordiffstat()".

For separation of configuration between repositories, revision
573bec4ab7ba changed the initialization source of "self._repo.ui"
from "ui"(overridden) to "baseui"(plain) of parent repository.
And this caused break of colorization.

This patch adds "ui" argument to "diff()" of abstractsubrepo and
classes derived from it to pass "ui" object of caller side.

--HG--
branch : stable
i18n-ja: synchronized with f94ead934067

--HG--
branch : stable
Added tag 2.4.1 for changeset 0c10cf819146

--HG--
branch : stable
Added signature for changeset 0c10cf819146

--HG--
branch : stable
osutil: write a C implementation of statfiles for unix

This makes a big difference to performance.

In a clean working directory containing 170,000 files, performance of
"hg --time diff" improves from 2.38 seconds to 1.69.
osutil: tab damage, how i hate thee
merge with i18n

--HG--
branch : stable
merge with stable
dirstate: test normalize is truthy instead of using a no-op lambda

hg perfstatus -u on a working directory with 170,000 files, without this
change:
! wall 1.869404 comb 1.850000 user 1.170000 sys 0.680000 (best of 6)

With this change:
! wall 1.839561 comb 1.830000 user 1.120000 sys 0.710000 (best of 6)
perf: add option to perfstatus to get the status of unknown files

When status needs to look at unknown files (e.g. when running hg status), it
needs to use a completely different algorithm than when it doesn't (e.g. when
running hg diff).

--HG--
extra : rebase_source : 21f7b55c2ded9afcb80e6eb9e4ded683447d835e
dirstate: inline more properties and methods in status

hg perfstatus -u on a working directory with 170,000 files, without this
change:
! wall 1.839561 comb 1.830000 user 1.120000 sys 0.710000 (best of 6)

With this change:
! wall 1.804222 comb 1.790000 user 1.140000 sys 0.650000 (best of 6)

hg perfstatus on the same directory, without this change:
! wall 1.016609 comb 1.020000 user 0.670000 sys 0.350000 (best of 10)

With this change:
! wall 0.985573 comb 0.980000 user 0.650000 sys 0.330000 (best of 10)

--HG--
extra : rebase_source : 6cb577c62c6caa2a2e725886571ea0b56fd6b4e0
tests: don't hardcode errno==2 for ENOENT

Hurd seems to set ENOENT to 2 + 2**30, unlike everyone else.

--HG--
branch : stable
merge: refactor action calculation into function

This pulls the code used to calculate the changes that need to happen
during merge.update() into a separate function.  This is not useful on
its own, but is instead preparatory to performing grafts in memory
when there are no potential conflicts.

--HG--
extra : rebase_source : 8f11c2867a8b08225bf9a6c6f9b5158a1c9eff2e
merge: support calculating merge actions against non-working contexts

This is not currently used.  It is instead a pre-requisite to
performing non-conflicting grafts in memory, which a subsequent patch
will do.
hgweb: fix iterator reuse in atom feed generation

--HG--
branch : stable
hgweb: avoid generator exhaustion with branches

--HG--
branch : stable
merge with stable