test-rollback: Ignore hook exit code
authorMads Kiilerich <mads@kiilerich.com>
Wed, 16 Dec 2009 12:10:21 +0100
changeset 10081 a5f3f9b1c42a
parent 10080 6d4fa274ae75
child 10082 66d8ec33da32
test-rollback: Ignore hook exit code Failing hooks returned 255 on Solaris
tests/test-rollback
tests/test-rollback.out
--- a/tests/test-rollback	Wed Dec 16 13:19:42 2009 +0100
+++ b/tests/test-rollback	Wed Dec 16 12:10:21 2009 +0100
@@ -33,7 +33,7 @@
 
 echo '% rollback by pretxncommit saves commit message (issue 1635)'
 echo a >> a
-hg --config hooks.pretxncommit=false commit -m"precious commit message"
+hg --config hooks.pretxncommit=false commit -m"precious commit message" 2>&1 | sed 's,exited with status .*,exited ...,g'
 echo '.hg/last-message.txt:'
 cat .hg/last-message.txt ; echo
 
@@ -43,6 +43,6 @@
 echo "another precious commit message" > "$1"
 __EOF__
 chmod +x $HGTMP/editor
-HGEDITOR=$HGTMP/editor hg --config hooks.pretxncommit=false commit
+HGEDITOR=$HGTMP/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g'
 echo '.hg/last-message.txt:'
 cat .hg/last-message.txt
--- a/tests/test-rollback.out	Wed Dec 16 13:19:42 2009 +0100
+++ b/tests/test-rollback.out	Wed Dec 16 12:10:21 2009 +0100
@@ -31,13 +31,13 @@
 % rollback by pretxncommit saves commit message (issue 1635)
 transaction abort!
 rollback completed
-abort: pretxncommit hook exited with status 1
+abort: pretxncommit hook exited ...
 .hg/last-message.txt:
 precious commit message
 % same thing, but run $EDITOR
 transaction abort!
 rollback completed
 note: commit message saved in .hg/last-message.txt
-abort: pretxncommit hook exited with status 1
+abort: pretxncommit hook exited ...
 .hg/last-message.txt:
 another precious commit message