tests/test-check-commit.t
author Manuel Jacob <me@manueljacob.de>
Wed, 11 Mar 2020 16:04:06 +0100
branchstable
changeset 5206 dc3571a37b56
parent 2672 a08bd434a19b
permissions -rw-r--r--
evolve: support ancestor of orphan split with unrelated changeset in between This is done by searching for roots and heads within the range delimited on both sides by the target revs instead of just within the target revs. Example: o 5 | o 4 | o 3 | | * 2 | | | x 1 |/ o 0 1 is obsoleted by 3 and 5. We are considering the case when 2 gets evolved. Before the change, both roots and heads were [3, 5]. The user was offered a choice between 3 and 5 as the destination. After the change, roots are [3] and heads are [5]. 5 is chosen as the destination.

#require test-repo

Enable obsolescence to avoid the warning issue when obsmarker are found

  $ cat << EOF >> $HGRCPATH
  > [diff]
  > git = yes
  > [experimental]
  > evolution=all
  > EOF

Go back in the hg repo

  $ cd $TESTDIR/..

  $ for node in `hg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do
  >    hg export $node | ${RUNTESTDIR}/../contrib/check-commit > ${TESTTMP}/check-commit.out
  >    if [ $? -ne 0 ]; then
  >        echo "Revision $node does not comply with rules"
  >        echo '------------------------------------------------------'
  >        cat ${TESTTMP}/check-commit.out
  >        echo
  >   fi
  > done