Mercurial > evolve
comparison tests/test-check-commit.t @ 6917:a7929709e89f mercurial-5.3
test-compat: merge mercurial-5.4 into mercurial-5.3
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 25 Oct 2024 17:25:27 +0400 |
parents | 03fe10eb9f2d |
children | 6859ed744625 |
comparison
equal
deleted
inserted
replaced
6812:ff7a9ad270b2 | 6917:a7929709e89f |
---|---|
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 |