relnotes: skip the test if the source repository is not readable
The test want to run the relnot extension, with the tested mercurial, on the
original repository. This is not always possible (e.g. when running with --pure
and the repository use zstd for example). So we skip the test in this case.
--- a/tests/test-contrib-relnotes.t Tue Oct 08 15:54:59 2024 +0200
+++ b/tests/test-contrib-relnotes.t Tue Oct 08 15:54:59 2024 +0200
@@ -2,6 +2,12 @@
$ . "$TESTDIR/helpers-testrepo.sh"
$ cd $TESTDIR/..
+ $ if hg root 2> /dev/null >&2; then true;
+ > else
+ > echo 'skipped: cannot read the source repository';
+ > exit 80;
+ > fi
+
$ python3 contrib/relnotes 4.4 --stoprev 4.5
changeset 3398603c5621: unexpected block in release notes directive feature
New Features