test: use obsolescence marker to test hidden

Instead of using a custom dedicated extension.

--HG--
extra : rebase_source : b070bc37c5eaa38a72a2543ab182c6b5653ca06e
phases: avoid changectx creation while checking command result

This minor changesets saves the creation of a `changectx` ctx object only used to
fetch the revision number.

--HG--
extra : rebase_source : 636d9b294c298c0d46d7ce4f7dc1173f3192a7e4
phases: prepare phase command for filtering

The phase command have some logic to report change made. We ensure this logic
run unfiltered.

With --force the command can change phase of a changeset for public to draft.
Such change can lead to obsolescence marker to apply again and the changeset to
be "hidden". If we do not run the logic unfiltered it could failed to fetch the
phase of a newly filtered changeset.

--HG--
extra : rebase_source : faf89f2f761249c09690408837778614393ca0b4
clfilter: fallback to unfiltered version when linkrev point to filtered history


On `filectx`, linkrev may point to any revision in the repository. When the
repository is filtered this may lead to `filectx` trying to build `changectx`
for filtered revision. In such case we fallback to creating `changectx` on the
unfiltered version of the reposition. This fallback should not be an issue
because `changectx` from `filectx` are not used in complex operation that
care about filtering. It is complicated to work around the issue in a
clearer way as code raising such `filectx` rarely have access to the
repository directly.

Linkrevs create a lot of issue with filtering. It is stored in revlog entry at
creation time and never changed. Nothing prevent the changeset revision pointed
to become filtered. Several bogus behavior emerge from such situation. Those
bugs are complex to solve and not part of the current effort to install
filtering. This changeset is simple hack that prevent plain crash in favor on
minor misbehavior without visible effect.

This "hack" is longly documented in to code itself to help people that would
look at it in the future.

--HG--
extra : rebase_source : d768fed8c1a33af1d0bf061eb71cae0e5b6e0f10
branchmap: read return None in case of failure

This makes a clear distinction between having read a valid cache on disk or not.
This will help caches of various filtering level to collaborate.

--HG--
extra : rebase_source : 584a4a3d20906768dbb3fc57f77cbfc0a41bc75e
vfs: add a read only vfs

This read only wrapper is intended to be used bundle repo. See follow up commit
for details.

--HG--
extra : rebase_source : f8a602bc30ba2903fcdf0d0a84c20c3f5c394ad3
branchmap: ignore Abort error while writing cache

Read only vfs can now raise Abort exception. Note that encoding.local are also a
possible raiser.

--HG--
extra : rebase_source : 0709951d9332aca086ef5470f1547262dc9ecc77
bundlerepo: enforce reading from core repo only

We do not want anything computed with the bundle overlay to be written back in
the repo. Such write will likely contains invalid data.

The short terms goal of this change is to drop use of `_cacheabletip` in bundle
repo.

--HG--
extra : rebase_source : 5f027bc9bcf464bf6521337f41abb011342d22ac
bundlerepo: drop use of `_cacheabletip`

Now that bundlerepo use a read only VFS, we do not worry about what part of the
branchmap is written back to disk. Nothing is written at all.

--HG--
extra : rebase_source : 23515a374258ddc15502ef1558609ecc370f91b7
mq: drop `_cacheabletip` usage

Strip have dedicated work around to solve the same problem, strip is even a
fraction faster without that thanks to simpler update process of the branchcache.

--HG--
extra : rebase_source : fd87a4dcd3dac9de360714e7e5dc670801737205
branchmap: drop `_cacheabletip` usage in `updatecache`

Nobody overwrite the `_cacheabletip` any more. We always update the cache for
the whole repo and write it to disk (or at list try to). The `updatecache` code
is simplied to remove the double phase logic associated with _cacheabletip.

--HG--
extra : rebase_source : 8adfa486f013a6899648970a8654351dc71d659a
localrepo: drop `_cacheabletip` method

It iss dead code now.

--HG--
extra : rebase_source : 28621f88cc662ea573cc88e47df2fdd33a6c7c1b
phases: make _filterunknown a member function of phasecache

We'd like the ability to call filterunknown on an existing phasecache
instance after nodes are destroyed.

--HG--
extra : rebase_source : e22901964f21b9740e3799eb053e8ec614f743b6
localrepo: filter unknown nodes from the phasecache on destroyed

When commit is followed by strip (qrefresh), phasecache contains nodes that were
removed from the changelog. Since phasecache is filecached with .hg/store/phaseroots
which doesn't change as a result of stripping, we have to filter it manually.

If we don't write it immediately, the next time it is read from disk the nodes
will be filtered again. That's what happened before, but there's no reason not
to write it immediately.

The change in test-keyword.t is caused by the above.

--HG--
extra : rebase_source : 20ad7868ada44377e7a87e596ee67960a86411ac
branchmap: disable fallback to unfiltered branchcache

Disables this simple optimisation to allow coming more powerfull approach: cache
collaboration.

Our goal is to have branchcache collaborate. This means that unfiltered
branchcache will fallback to some filtered branchcache if invalid. We can't have
the filtered branchcache to use the unfiltered one. That would loop.

--HG--
extra : rebase_source : 2b36830d13ed4bd4f4432509302921e299b74097
test-command-template.t: make "age" filter test work on Feb 29th

reported by Julien Cristau.

--HG--
branch : stable
destroyed: filter unknown before computing branchcache

Branchcache of filtered version need up to date phase data.

--HG--
extra : rebase_source : bf6850d3737f226fa6b8e6f962badcdad88f148d
dispatch: handle empty `testedwith` value in extension

When extensions had an empty `testedwith` attribute the code tried to parse it
and failed. As a result the actual error were shallowed by a This crash.

We now treat empty strip as 'unknown'

--HG--
branch : stable
extra : rebase_source : d9fcf32fb439371106d26317c54755d0ff3a91a1
merge with crew-stable
test-dispatch.t: remove incorrect "cd $dir"

A line that should have been removed in 50fbe9063ff2.