Mercurial > evolve
changeset 6854:03fe10eb9f2d stable
tests: update test-check-commit.t with changes from the upstream version
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 13 Oct 2024 18:07:22 +0400 |
parents | 753e378208b7 |
children | 184614020008 |
files | tests/test-check-commit.t |
diffstat | 1 files changed, 17 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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