##// END OF EJS Templates
interfaces: make `dirstate` Protocol class methods abstract...
interfaces: make `dirstate` Protocol class methods abstract Now all known Protocol methods that should be implemented by the subclass are abstract. See cdd4bc69bfc1 for details. Note that this will break the `git` extension more, because there are a bunch of methods that aren't implemented that should be, in favor of some very old methods that won't be called (like `add()` and `drop()`). It's already broken, so I'm not taking the time to figure out how to modernize it right now. It's not detected by pytype because the only instantiation of `gitdirstate` is in `git/__init__.py`, which was already excluded from pytype checking for some other reason. AT least with this, it 1) doesn't get forgotten about, and 2) will require changing the interface if/when the core dirstate class evolves.

File last commit:

r53164:81e59988 stable
r53405:2ac368d0 default
Show More
build-linux-wheels.sh
47 lines | 1.3 KiB | application/x-sh | BashLexer
#!/bin/bash
# Intended to run within docker using image:
#
# registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0
#
# we might want to factor most of this with the associated mercurial-core CI
# definition. (i.e. move this script into a place where the CI can directly call it for its purpose)
set -e -x
PYTHON_TARGETS="cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313"
export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1
# We need to copy the repository to ensure:
# (1) we don't wrongly write roots files in the repository (or any other wrong
# users)
# (2) we don't reuse pre-compiled extension built outside for manylinux and
# therefor not compatible.
cp -r /src/ /tmp/src/
cd /tmp/src/
# clear potentially cached artifact from the host
# (we could narrow this purge probably)
hg purge \
--ignored \
--no-confirm
if [ ! -e /src/dist/ ]; then
mkdir -p /src/dist
chown `stat /src/ -c %u:%g` /src/dist/
fi
for py in $PYTHON_TARGETS; do
echo 'build wheel for' $py
# cleanup any previous wheel
tmp_wd="/tmp/wheels/$py/repaired"
rm -rf $tmp_wd
mkdir -p $tmp_wd
# build a new wheel
contrib/build-one-linux-wheel.sh $py $tmp_wd
# fix the owner back to the repository owner
chown `stat /src/ -c %u:%g` $tmp_wd/*.whl
mv $tmp_wd/*.whl /src/dist/
done