testing: allow Hypothesis to enable extensions
This adds support for testing extensions, including both tests
that extensions don't change behaviour and test for specific
commands.
We use the precondition system to determine what commands are
available to us. If we never use any commands enabled by an
extension then that extension is *skippable* and should not
have changed the behaviour of the test. We thus rerun the test
with an environment variable which is designed to turn off the
extension.
testing: test multiple repositories with Hypothesis
This expands the Hypothesis based stateful testing so that
rather than having a single repository under test, Hypothesis
manages a family of repositories. Some of these are freshly
created, some are clones of others.
testing: expand Hypothesis tests with branch commands
This builds on the previous work to add Hypothesis based stateful
testing to add branching commands to the model.
testing: generate tests operations using Hypothesis
The idea of this patch is to expand the use of Hypothesis
within Mercurial to use its concept of "stateful testing".
The result is a test which runs a sequence of operations
against a Mercurial repository. Each operation is given a
set of allowed ways it can fail. Any other non-zero exit
code is a test failure.
At the end, the whole sequence is then reverified by
generating a .t test and testing it again in pure
mode (this is also useful for catching non-determinism
bugs).
This has proven reasonably effective at finding bugs,
and has identified two problems in the shelve extension
already (
issue5113 and
issue5112).
i18n-ja: synchronized with
cb6a952efbf4
log: fix order of revisions filtered by multiple OR options (
issue5100)
This is the simplest workaround for the issue of the ordering of revset, which
is that the expression "x or y" takes over the ordering specified by the input
set (or the left-hand-side expression.) For example, the following expression
A & (x | y)
will be evaluated as if
(A & x) | (A & y)
That's wrong because revset has ordering. I'm going to fix this problem in
the revset module, but that wouldn't fit to stable. So, this patch just works
around the common log cases.
Since this change might have some impact on performance, it is enabled only
if the expression built from log options has ' or ' operation.
demandimport: add _imp to ignore list
Mozilla is seeing an issue with demand importing of _imp
failing in pkg_resources/__init__.py:fixup_namespace_packages.
It strangely only reproduces when using a modern version of
setuptools/pip in certain scenarios. Adding _imp to the demand import
ignore list seems to make the problem go away.
zeroconf: fix crash in "hg paths" when zeroconf server is up
Running "hg paths" with zeroconf enabled and when a zeroconf server is up
and running gives a traceback with "ValueError: rawloc must be defined".
This is because zeroconf needs to wrap ui.configsuboptions(), introduced in
dccbebcff075.
zeroconf: fix setsockopt() call on Solaris to send payload of correct length
The zeroconf extension has been broken on Solaris since the beginning, but
no one noticed until the testsuite started poking it after changeset
72f2a19c5f88, when it started running "hg paths" with the extension
enabled.
Solaris requires that, for IP_MULTICAST_{TTL,LOOP}, the argument passed in
be of length 1. With the original code here, it gets passed in as an int
-- length 4 -- and so the system call fails with EINVAL. Thankfully,
Python's socket.setsockopt() allows you to pass in a string instead of an
integer, and it passes that string to libc's setsockopt() with the correct
value and length.