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.
clfilter: prevent unwanted warning about filtered parents as unknown
During changectx __init__ the dirstate's parents MAY be checked. If
the repo is filtered, this check will complain "working directory has
unknown parents" even if the parents are perfectly known.
This may happen when the repo is used for serving and the dirstate has
parents that are secret, as those secret changesets will be filtered.
clfilter: strip logic should be unfiltered
Strip is a "write" operation that needs to be aware of the whole repo's
content before destroying changesets.
Only the low level function is altered. The top level command will still
process its argument filtered (if any filtering is in place).
clfilter: verify logic should be unfiltered
To verify a changelog obviously needs all of it. The verify logic now
ensures it works on an unfiltered repository.
clfilter: phases logic should be unfiltered
Phase computations and boundary movements need to be aware of all
revisions that exist in the repository to return correct results.
clfilter: unfilter computation of obsolescence related computation
All obsolescence related sets need to be computed on the full unfiltered
version of the repository, in particular because several of them
(obsolete, extinct) are used to compute the hidden revisions.
On a filtered repo, revset predicates related to these sets will be
properly filtered because of revset's own pre-filtering.
clfilter: ensure changeset creation in the repo is run unfiltered
This applies to both creation of new commits and application of
changegroups.
clfilter: ensure changegroup generation is run unfiltered
Changegroup generation logic needs to be aware of the whole repository
to work properly.
clfilter: ensure `rollback` is run unfiltered
Rollback logic needs to be aware of the whole repository to work properly.
clfilter: ensure cache invalidation is done on the main unfiltered repo
The proxy version will not hold any cache for now. But we have to ensure
all cache operations are done on the unfiltered version.