# HG changeset patch # User Alexis S. L. Carvalho # Date 1173029711 10800 # Node ID 193e0f8d9a47af8c45d93a9761194750182537ab # Parent efe6f92c0847b47456fb025cdcee1de67991b0c1 test-abort-checkin: use a hook to abort the commit This should make it more portable. diff --git a/tests/test-abort-checkin b/tests/test-abort-checkin --- a/tests/test-abort-checkin +++ b/tests/test-abort-checkin @@ -1,12 +1,19 @@ #!/bin/sh +cat > abortcommit.py <> $HGRCPATH echo "mq=" >> $HGRCPATH -cat > $HGTMP/false <> $HGRCPATH hg init foo cd foo @@ -15,7 +22,7 @@ hg add foo # mq may keep a reference to the repository so __del__ will not be called # and .hg/journal.dirstate will not be deleted: -HGEDITOR=$HGTMP/false hg ci -HGEDITOR=$HGTMP/false hg ci +hg ci -m foo +hg ci -m foo exit 0 diff --git a/tests/test-abort-checkin.out b/tests/test-abort-checkin.out --- a/tests/test-abort-checkin.out +++ b/tests/test-abort-checkin.out @@ -1,6 +1,8 @@ -abort: edit failed: false exited with status 1 +error: pretxncommit.nocommits hook failed: no commits allowed +abort: no commits allowed transaction abort! rollback completed -abort: edit failed: false exited with status 1 +error: pretxncommit.nocommits hook failed: no commits allowed +abort: no commits allowed transaction abort! rollback completed