From fdeb3561228cec5177fbbc8435a37d28ac381066 Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Fri, 20 Jun 2008 09:55:45 -0500 Subject: [PATCH] -ticket > -trac. --- {server => cbas}/post-receive | 0 {server => cbas}/pre-receive | 0 client/{commit-msg => commit-msg-trac} | 0 server/{pre-receive-ticket => pre-receive-trac} | 0 server/pre-receive-trac-then-noop | 10 ++++++++++ ...-ticket-hook.sh => t1000-client-commit-msg-trac.sh} | 4 ++-- ...merge.sh => t1001-client-commit-msg-trac-merges.sh} | 4 ++-- ...eive-ticket.sh => t2000-server-pre-receive-trac.sh} | 4 ++-- ...im.sh => t2001-server-pre-receive-trac-via-shim.sh} | 7 ++++--- ...es.sh => t2002-server-pre-receive-trac-branches.sh} | 4 ++-- ...rges.sh => t2003-server-pre-receive-trac-merges.sh} | 4 ++-- 11 files changed, 24 insertions(+), 13 deletions(-) rename {server => cbas}/post-receive (100%) rename {server => cbas}/pre-receive (100%) rename client/{commit-msg => commit-msg-trac} (100%) rename server/{pre-receive-ticket => pre-receive-trac} (100%) create mode 100644 server/pre-receive-trac-then-noop rename tests/{t1000-client-commit-msg-ticket-hook.sh => t1000-client-commit-msg-trac.sh} (91%) rename tests/{t1001-client-commit-msg-ticket-merge.sh => t1001-client-commit-msg-trac-merges.sh} (79%) rename tests/{t2000-server-pre-receive-ticket.sh => t2000-server-pre-receive-trac.sh} (94%) rename tests/{t2001-server-pre-receive-ticket-via-shim.sh => t2001-server-pre-receive-trac-via-shim.sh} (78%) rename tests/{t2002-server-pre-receive-ticket-branches.sh => t2002-server-pre-receive-trac-branches.sh} (93%) rename tests/{t2003-server-pre-receive-ticket-merges.sh => t2003-server-pre-receive-trac-merges.sh} (87%) diff --git a/server/post-receive b/cbas/post-receive similarity index 100% rename from server/post-receive rename to cbas/post-receive diff --git a/server/pre-receive b/cbas/pre-receive similarity index 100% rename from server/pre-receive rename to cbas/pre-receive diff --git a/client/commit-msg b/client/commit-msg-trac similarity index 100% rename from client/commit-msg rename to client/commit-msg-trac diff --git a/server/pre-receive-ticket b/server/pre-receive-trac similarity index 100% rename from server/pre-receive-ticket rename to server/pre-receive-trac diff --git a/server/pre-receive-trac-then-noop b/server/pre-receive-trac-then-noop new file mode 100644 index 0000000..ae2d7cf --- /dev/null +++ b/server/pre-receive-trac-then-noop @@ -0,0 +1,10 @@ +#!/bin/sh + +input="" +while read line ; do + input="$input$line" +done + +echo $input | sh $GIT_DIR/hooks/pre-receive-trac && +echo $input | sh $GIT_DIR/hooks/noop + diff --git a/tests/t1000-client-commit-msg-ticket-hook.sh b/tests/t1000-client-commit-msg-trac.sh similarity index 91% rename from tests/t1000-client-commit-msg-ticket-hook.sh rename to tests/t1000-client-commit-msg-trac.sh index 0e4146e..5e70a4c 100644 --- a/tests/t1000-client-commit-msg-ticket-hook.sh +++ b/tests/t1000-client-commit-msg-trac.sh @@ -1,11 +1,11 @@ #!/bin/sh -test_description='client commit-msg ticket enforcer' +test_description='client commit-msg trac ticket enforcer' . ./test-lib.sh # setup the commit-msg hook -install_client_hook 'commit-msg' 'commit-msg' +install_client_hook 'commit-msg-trac' 'commit-msg' test_expect_success 'rejects with bad message' ' echo "$test_name" >file && diff --git a/tests/t1001-client-commit-msg-ticket-merge.sh b/tests/t1001-client-commit-msg-trac-merges.sh similarity index 79% rename from tests/t1001-client-commit-msg-ticket-merge.sh rename to tests/t1001-client-commit-msg-trac-merges.sh index 79cd9f7..80206b5 100644 --- a/tests/t1001-client-commit-msg-ticket-merge.sh +++ b/tests/t1001-client-commit-msg-trac-merges.sh @@ -1,11 +1,11 @@ #!/bin/sh -test_description='client commit-msg ticket enforcer for merges' +test_description='client commit-msg trac ticket enforcer for merges' . ./test-lib.sh # setup the commit-msg hook -install_client_hook 'commit-msg' 'commit-msg' +install_client_hook 'commit-msg-trac' 'commit-msg' test_expect_success 'accepts merge' ' echo "$test_name" >file && diff --git a/tests/t2000-server-pre-receive-ticket.sh b/tests/t2000-server-pre-receive-trac.sh similarity index 94% rename from tests/t2000-server-pre-receive-ticket.sh rename to tests/t2000-server-pre-receive-trac.sh index 27b1b11..38d3946 100644 --- a/tests/t2000-server-pre-receive-ticket.sh +++ b/tests/t2000-server-pre-receive-trac.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='server pre-receive ticket enforcer' +test_description='server pre-receive trac ticket enforcer' . ./test-lib.sh @@ -16,7 +16,7 @@ test_expect_success 'setup' ' ' # setup the pre-receive hook -install_server_hook 'pre-receive-ticket' 'pre-receive' +install_server_hook 'pre-receive-trac' 'pre-receive' test_expect_success 'reject with bad message' ' echo $test_name >a && diff --git a/tests/t2001-server-pre-receive-ticket-via-shim.sh b/tests/t2001-server-pre-receive-trac-via-shim.sh similarity index 78% rename from tests/t2001-server-pre-receive-ticket-via-shim.sh rename to tests/t2001-server-pre-receive-trac-via-shim.sh index 7167fd8..646cf37 100644 --- a/tests/t2001-server-pre-receive-ticket-via-shim.sh +++ b/tests/t2001-server-pre-receive-trac-via-shim.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='server pre-receive ticket enforcer via shim' +test_description='server pre-receive trac ticket enforcer via shim' . ./test-lib.sh @@ -16,8 +16,9 @@ test_expect_success 'setup' ' ' # setup the shim -install_server_hook 'pre-receive' 'pre-receive' -install_server_hook 'pre-receive-ticket' 'pre-receive-ticket' +install_server_hook 'noop' 'noop' +install_server_hook 'pre-receive-trac' 'pre-receive-trac' +install_server_hook 'pre-receive-trac-then-noop' 'pre-receive' test_expect_success 'reject with bad message via shim' ' echo $test_name >a && diff --git a/tests/t2002-server-pre-receive-ticket-branches.sh b/tests/t2002-server-pre-receive-trac-branches.sh similarity index 93% rename from tests/t2002-server-pre-receive-ticket-branches.sh rename to tests/t2002-server-pre-receive-trac-branches.sh index b9c95ba..3588124 100644 --- a/tests/t2002-server-pre-receive-ticket-branches.sh +++ b/tests/t2002-server-pre-receive-trac-branches.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='server pre-receive ticket enforcer via shim' +test_description='server pre-receive trac ticket enforcer via shim' . ./test-lib.sh @@ -16,7 +16,7 @@ test_expect_success 'setup' ' ' # setup the hook -install_server_hook 'pre-receive-ticket' 'pre-receive' +install_server_hook 'pre-receive-trac' 'pre-receive' test_expect_success 'reject new branch with bad message' ' git checkout -b topic1 master && diff --git a/tests/t2003-server-pre-receive-ticket-merges.sh b/tests/t2003-server-pre-receive-trac-merges.sh similarity index 87% rename from tests/t2003-server-pre-receive-ticket-merges.sh rename to tests/t2003-server-pre-receive-trac-merges.sh index 7ca02b1..7d3180d 100644 --- a/tests/t2003-server-pre-receive-ticket-merges.sh +++ b/tests/t2003-server-pre-receive-trac-merges.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='server pre-receive ticket enforcer via shim' +test_description='server pre-receive trac ticket enforcer via shim' . ./test-lib.sh @@ -16,7 +16,7 @@ test_expect_success 'setup' ' ' # setup the hook -install_server_hook 'pre-receive-ticket' 'pre-receive' +install_server_hook 'pre-receive-trac' 'pre-receive' test_expect_success 'accept merge with merge message' ' git checkout -b topic1 master && -- 2.39.5