Mercurial > evolve
view tests/test-check-commit.t @ 6907:5439ac6b2fc2 mercurial-6.2
ci: replace `hg id` call with $CI_COMMIT_HG_BRANCH
This is easier to do than install newer Mercurial on an older CI image.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 24 Oct 2024 20:40:46 +0400 |
parents | 03fe10eb9f2d |
children | 6859ed744625 |
line wrap: on
line source
#require test-repo $ . "$RUNTESTDIR/helpers-testrepo.sh" Enable obsolescence to avoid the warning issue when obsmarkers are found $ cat << EOF >> $HGRCPATH > [experimental] > evolution = all > EOF Go back in the hg repo $ cd $TESTDIR/.. $ REVSET='not public() and ::. and not desc("# no-check-commit")' $ mkdir "$TESTTMP/p" $ REVS=`testrepohg log -r "$REVSET" -T.` $ if [ -n "$REVS" ] ; then > testrepohg export --git -o "$TESTTMP/p/%n-%h" -r "$REVSET" > for f in `ls "$TESTTMP/p"`; do > "$RUNTESTDIR/../contrib/check-commit" < "$TESTTMP/p/$f" > "$TESTTMP/check-commit.out" > if [ $? -ne 0 ]; then > node="${f##*-}" > echo "Revision $node does not comply with rules" > echo '------------------------------------------------------' > cat ${TESTTMP}/check-commit.out > echo > fi > done > fi