# HG changeset patch # User Christian Ebert # Date 1196501560 -3600 # Node ID d3cdaa49a64443ac7d621be9ead0c0a5ccb14694 # Parent 815dc4a042965ea0f731ca09bc4d60cf4eb8a09c Test that commit hooks are not run on interrupted commit diff -r 815dc4a04296 -r d3cdaa49a644 tests/test-keyword --- a/tests/test-keyword Sat Dec 01 09:52:00 2007 +0100 +++ b/tests/test-keyword Sat Dec 01 10:32:40 2007 +0100 @@ -37,9 +37,19 @@ echo % cat cat sym a b +echo % addremove +hg addremove +echo % status +hg status + echo % default keyword expansion including commit hook +echo % interrupted commit should not change state or run commit hook +HGEDITOR=false hg --debug commit +echo % status +hg status + echo % commit -hg --debug commit -A -mabsym -d '0 0' -u 'User Name ' +hg --debug commit -mabsym -d '0 0' -u 'User Name ' echo % status hg status echo % identify @@ -121,7 +131,7 @@ secondline EOF -echo % interrupted commit +echo % interrupted commit should not change state HGEDITOR=false hg commit echo % status hg status diff -r 815dc4a04296 -r d3cdaa49a644 tests/test-keyword.out --- a/tests/test-keyword.out Sat Dec 01 09:52:00 2007 +0100 +++ b/tests/test-keyword.out Sat Dec 01 10:32:40 2007 +0100 @@ -92,11 +92,27 @@ do not process $Id: xxx $ ignore $Id$ -% default keyword expansion including commit hook -% commit +% addremove adding a adding b adding sym +% status +A a +A b +A sym +% default keyword expansion including commit hook +% interrupted commit should not change state or run commit hook +a +b +sym +transaction abort! +rollback completed +abort: edit failed: false exited with status 1 +% status +A a +A b +A sym +% commit a b sym @@ -193,7 +209,7 @@ xxx $ ignore $Id$ a -% interrupted commit +% interrupted commit should not change state transaction abort! rollback completed abort: edit failed: false exited with status 1