Skip to content
Snippets Groups Projects
user avatar
Matt Harbison authored
I noticed this when running `py hghave` on a system that still has Python2- the
Windows launcher attempts to honor the version of python in the shebang, but
`hghave` recently gained py3 type annotations, so that resulted in a
SyntaxError.  I guess CI has the compat shim installed to redirect `python` to
`python3`, and maybe that's why nobody noticed.

These were located by grepping for `#!.+python\b`.  The remaining handful of
cases are tests trying to find python files, which is fine as-is.

The one thing to call out here is that apparently the RPM building hasn't worked
with Python3 (or we've been getting lucky).  `contrib/hg-ssh` has had a python3
shebang line since late 2020, which means the EOL anchor would have caused it to
not match and not be replaced with `%{pythonexe}`.  OTOH, it looks like that
variable was used prior to the `hg-ssh` update in order to default to python3
(as opposed to using a specific /path/to/pythonX), and maybe the update to
`hg-ssh` simply broke python2 builds.  I'm not going to worry about this for
now, since there are also direct calls to `setup.py`, which no longer work as of
this release cycle.  Somebody interested in RPMs can figure out all of the
issues at once.
f8f14e6d
History

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

$ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help

Running without installing::

$ make local # build for inplace usage
$ ./hg --version # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.

Notes for packagers
===================

Mercurial ships a copy of the python-zstandard sources. This is used to
provide support for zstd compression and decompression functionality. The
module is not intended to be replaced by the plain python-zstandard nor
is it intended to use a system zstd library. Patches can result in hard
to diagnose errors and are explicitly discouraged as unsupported
configuration.