tests/test-check-commit.t
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 13 Apr 2018 10:36:03 -0700
changeset 37708 8e8541610d85
parent 37687 8872d46643b6
child 37816 33817e09c663
permissions -rw-r--r--
scmutil: make shortesthexnodeidprefix() use unfiltered repo Both callers were doing this, and resolvehexnodeidprefix() was also working on the unfiltered repo, so it makes more sense to have it all in one place. Differential Revision: https://phab.mercurial-scm.org/D3313

#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/..

  $ mkdir "$TESTTMP/p"
  $ testrepohg export --git -o "$TESTTMP/p/%n-%h" \
  > -r 'not public() and ::. and not desc("# no-check-commit")'
  $ 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