comparison tests/test-check-commit.t @ 6913:3c5966b42c21 mercurial-5.7

test-compat: merge mercurial-5.8 into mercurial-5.7
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 25 Oct 2024 16:31:50 +0400
parents 03fe10eb9f2d
children 6859ed744625
comparison
equal deleted inserted replaced
6808:c7d3e1d8c6f1 6913:3c5966b42c21
1 #require test-repo 1 #require test-repo
2
3 $ . "$RUNTESTDIR/helpers-testrepo.sh"
2 4
3 Enable obsolescence to avoid the warning issue when obsmarkers are found 5 Enable obsolescence to avoid the warning issue when obsmarkers are found
4 6
5 $ cat << EOF >> $HGRCPATH 7 $ cat << EOF >> $HGRCPATH
6 > [experimental] 8 > [experimental]
7 > evolution = all 9 > evolution = all
8 > [diff]
9 > git = yes
10 > EOF 10 > EOF
11 11
12 Go back in the hg repo 12 Go back in the hg repo
13 13
14 $ cd $TESTDIR/.. 14 $ cd $TESTDIR/..
15 15
16 $ for node in `hg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do 16 $ REVSET='not public() and ::. and not desc("# no-check-commit")'
17 > hg export $node | ${RUNTESTDIR}/../contrib/check-commit > ${TESTTMP}/check-commit.out 17
18 > if [ $? -ne 0 ]; then 18 $ mkdir "$TESTTMP/p"
19 > echo "Revision $node does not comply with rules" 19 $ REVS=`testrepohg log -r "$REVSET" -T.`
20 > echo '------------------------------------------------------' 20 $ if [ -n "$REVS" ] ; then
21 > cat ${TESTTMP}/check-commit.out 21 > testrepohg export --git -o "$TESTTMP/p/%n-%h" -r "$REVSET"
22 > echo 22 > for f in `ls "$TESTTMP/p"`; do
23 > fi 23 > "$RUNTESTDIR/../contrib/check-commit" < "$TESTTMP/p/$f" > "$TESTTMP/check-commit.out"
24 > done 24 > if [ $? -ne 0 ]; then
25 > node="${f##*-}"
26 > echo "Revision $node does not comply with rules"
27 > echo '------------------------------------------------------'
28 > cat ${TESTTMP}/check-commit.out
29 > echo
30 > fi
31 > done
32 > fi