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