import-checker: handle standard modules with arch in the filename
Installations with module names like
/usr/lib/python2.7/lib-dynload/bz2.x86_64-linux-gnu.so occurs in the wild.
Let's just ignore everything after first '.' when guessing the Python module
name.
tests: use ls instead of find, all files are in the same directory
In this case find has no advantage compared to ls. Descending into directories
is unnecessary, because there are none.
commands: hg debuginstall checks missing templates (
issue4151)
Missing templates where not reported as a problem, only an empty bracket
were shown as indication of no found template directory:
$ hg debuginstall
*...some lines*
checking templates ()...
*...some lines*
no problems detected
Now the problem is reported and extended with some information. The style
of the messages is adapted to the other messages of debuginstall.
When no templates directories exist, it writes:
$ hg debuginstall
*...some lines*
checking templates ()...
no template directories found
(templates seem to have been installed incorrectly)
*...some lines*
1 problems detected, please check your install!
When the template map is not found, it writes:
$ hg debuginstall
*...some lines*
checking templates (/path/to/mercurial/templates)...
template 'default' not found
(templates seem to have been installed incorrectly)
*...some lines*
1 problems detected, please check your install!
When the template map is buggy the message is the same as before. The error
message is shown before the line "(templates seem ...)".
No test is added because testing this failure is complicated. It would
require to modify the templates directory of the mercurial installation,
or to monkey patch a function (os.listdir or any from mercurial.templater)
by a test extension.
contrib/Makefile.python: build local Python from source
This provides an easy way to install new or old Python versions on Unixish
systems. It is mainly intended for testing Mercurial with different Python
versions.
Example:
$ cd build
$ make -f ../contrib/Makefile.python python PYTHONVER=2.4 PREFIX=/tmp/p24
$ /tmp/p24/bin/python -V
Python 2.4
Tested on Fedora, Debian and Ubuntu with Python versions from 2.4 to 2.7.6.
Most Python versions need some workarounds to compile on Debian-ish systems.
The workarounds do not do any significant harm on Fedora.
tests: use small conditional section for tic requirement in test-status-color.t
Better test coverage when curses not is available.
import-checker: show stdlib and relative imports separately
Make the output more useful for debugging problems.
tests: improved test coverage for HTTP authentication and 401 responses
Dump the access log to verify that the client gets the 401s it deserves and
handles them correctly. This establishes a baseline for Basic authentication
protocol.
tests: ignore http tests that are known wontfix failures on python 2.4
As mentioned on http://bz.selenic.com/show_bug.cgi?id=2739#c17 ,
b3083042bdda
left test-http.t failing on Python < 2.4.3. That has not been noticed because
most 2.4 testing has been done with a patched 2.4.2.
This makes sure that the tests only are run for Python >= 2.4.3. That makes it
possible to verify that everything else works with Python 2.4.
import-checker: fix names of dynamically loaded modules
The import checker found standard library modules such as
lib-dynload/zlibmodule.so but saw that as a 'zlibmodule' module, not as the
'zlib' module.
Debian ships Python with most modules built-in and this incorrect handling of
dynamic modules did thus not cause problems on that platform.
Fedora ships Python with as many modules as possible loaded dynamically. That
made the import checker tests fail with incorrect classification of the
following modules: array fcntl grp itertools time zlib.
This change makes test-module-imports.t pass on Fedora.