# HG changeset patch # User Anton Shestakov # Date 1728828442 -14400 # Node ID 03fe10eb9f2d770d8ba90a50eadaa5c1011a9261 # Parent 753e378208b7e31cd36ee17a9757d24dd99b0669 tests: update test-check-commit.t with changes from the upstream version diff -r 753e378208b7 -r 03fe10eb9f2d tests/test-check-commit.t --- a/tests/test-check-commit.t Sun Oct 13 17:39:40 2024 +0400 +++ b/tests/test-check-commit.t Sun Oct 13 18:07:22 2024 +0400 @@ -7,20 +7,26 @@ $ cat << EOF >> $HGRCPATH > [experimental] > evolution = all - > [diff] - > git = yes > EOF Go back in the hg repo $ cd $TESTDIR/.. - $ for node in `testrepohg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do - > testrepohg export $node | ${RUNTESTDIR}/../contrib/check-commit > ${TESTTMP}/check-commit.out - > if [ $? -ne 0 ]; then - > echo "Revision $node does not comply with rules" - > echo '------------------------------------------------------' - > cat ${TESTTMP}/check-commit.out - > echo - > fi - > done + $ 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