tests/test-check-commit.t
author Raphaël Gomès <rgomes@octobus.net>
Mon, 26 Apr 2021 22:59:56 +0200
changeset 47377 26127236b229
parent 37816 33817e09c663
permissions -rw-r--r--
convert-bazaar: use breezy package instead of old bzr one Breezy is the most recent of the two, and works on Python 3 while being compatible with the (old) Bazaar file format. This patch contains a variety of unicode <-> bytes changes, API breakage fixing, restoring failing imports and changing the executable from `bzr` to `brz`. I recommend using the debian packages for `brz` and `python3-breezy` (3.1+), because the pip package seems to be haunted by radioactive dragons. Differential Revision: https://phab.mercurial-scm.org/D10513

#require test-repo

Enable obsolescence to avoid the warning issue when obsmarker are found

  $ . "$TESTDIR/helpers-testrepo.sh"

Go back in the hg repo

  $ cd $TESTDIR/..

  $ 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
  >      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