tests: make check-py3-compat.py actually load the specified files correctly
For most uses, this change is essentially a no-op, as this script is generally
only run by test-check-py3-compat.t, which will already put `$TESTDIR/..` in
`$PYTHONPATH`.
When running outside of tests, however, `$PYTHONPATH` is likely not set, causing
check-py3-compat.py to parse the file from the repo, but then import the
installed version, and raise any errors about the installed version, not the one
currently in the repo.
Additionally, this helps users (like me) who have a strange set up where their
home directory (and thus their hg repos) happen to be in a subdirectory of
sys.prefix (which is /usr on my system). Since the '.' entry added to sys.path
takes precedence over the absolute path of `$TESTDIR/..` in `$PYTHONPATH`, the
path to the modules that it imports (and that show up in any stack trace) are
*relative*, meaning that we don't detect them as starting with `sys.prefix`.
Sample non-test invocation, and the difference this change makes (the path for
'error at <path>:<line>' is correct now)::
Before:
```
$ python3 contrib/check-py3-compat.py mercurial/win*.py
mercurial/win32.py: error importing: <ValueError> _type_ 'v' not supported (error at check-py3-compat.py:65)
mercurial/windows.py: error importing: <ModuleNotFoundError> No module named 'msvcrt' (error at check-py3-compat.py:65)
```
After:
```
$ python3 contrib/check-py3-compat.py mercurial/win*.py
mercurial/win32.py: error importing: <ValueError> _type_ 'v' not supported (error at win32.py:11)
mercurial/windows.py: error importing: <ModuleNotFoundError> No module named 'msvcrt' (error at windows.py:12)
```
Differential Revision: https://phab.mercurial-scm.org/D8814
tests: virtualenv is only used on py2, rename and conditionalize
If I have I have the Debian `python3-virtualenv` package installed on my
machine, the import succeeds but then I receive an AttributeError because the
package is essentially completely different between py2 and py3, and
test-hghave fails.
Differential Revision: https://phab.mercurial-scm.org/D8812
morestatus: mention --stop even if not using --verbose
Differential Revision: https://phab.mercurial-scm.org/D8811
exchange: backout changeset
c26335fa4225
Changeset
c26335fa4225 has good intends but introduce significant behavior
regressions for multiple important cases. In short there are many case where
push would have caught instability creation/propagation that are no longer
covered. These behavior have been covered for many years and even if some
related case are not currently caught, the covered one should not be regressed.
The next four changesets introduce tests for some of these cases. However we
could produce many more tests cases since the area is wide and they are many
possible combination. (And we should cover them when getting back to this issue)
Since 5.5 is one week away, the most reasonable approach seems to back this out
while we devise a new way to move forward that preserve the current behavior,
catch more issues and also improves the situation that
c26335fa4225 target.
In addition to the behavior change,
c26335fa4225 also introduced output
changes. These output changes does not requires a backout per-se, but are part of
the same changeset. However they come with a couple of issues that also requires
attention:
1) the bulk of the error message have been shoehorned into a multiple line abort
message. This seems quite different from what we usually do. The abort message
should be a compact and efficient message, with extra details being issued as
normal error output beforehand. (with --verbose/--quiet) support.
2) the current output is unbounded, so if there is many (tens, hundreds,
thousands, …) of unstable/obsolete changeset involved in the push, the output
can quickly become a scary and un-usuable wall of text. So we need some
limitation here (same as we have with the remote head list that says A, B , C
and # others).