tests/test-check-commit.t
branchstable
changeset 37816 33817e09c663
parent 37687 8872d46643b6
equal deleted inserted replaced
37815:32a75a8a5b0f 37816:33817e09c663
     6 
     6 
     7 Go back in the hg repo
     7 Go back in the hg repo
     8 
     8 
     9   $ cd $TESTDIR/..
     9   $ cd $TESTDIR/..
    10 
    10 
       
    11   $ REVSET='not public() and ::. and not desc("# no-check-commit")'
       
    12 
    11   $ mkdir "$TESTTMP/p"
    13   $ mkdir "$TESTTMP/p"
    12   $ testrepohg export --git -o "$TESTTMP/p/%n-%h" \
    14   $ REVS=`testrepohg log -r "$REVSET" -T.`
    13   > -r 'not public() and ::. and not desc("# no-check-commit")'
    15   $ if [ -n "$REVS" ] ; then
    14   $ for f in `ls "$TESTTMP/p"`; do
    16   >   testrepohg export --git -o "$TESTTMP/p/%n-%h" -r "$REVSET"
    15   >    contrib/check-commit < "$TESTTMP/p/$f" > "$TESTTMP/check-commit.out"
    17   >   for f in `ls "$TESTTMP/p"`; do
    16   >    if [ $? -ne 0 ]; then
    18   >      contrib/check-commit < "$TESTTMP/p/$f" > "$TESTTMP/check-commit.out"
    17   >        node="${f##*-}"
    19   >      if [ $? -ne 0 ]; then
    18   >        echo "Revision $node does not comply with rules"
    20   >          node="${f##*-}"
    19   >        echo '------------------------------------------------------'
    21   >          echo "Revision $node does not comply with rules"
    20   >        cat ${TESTTMP}/check-commit.out
    22   >          echo '------------------------------------------------------'
    21   >        echo
    23   >          cat ${TESTTMP}/check-commit.out
    22   >   fi
    24   >          echo
    23   > done
    25   >     fi
       
    26   >   done
       
    27   > fi