OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 set -e | 3 set -e |
4 | 4 |
5 . ./test-lib.sh | 5 . ./test-lib.sh |
6 | 6 |
7 setup_initsvn | 7 setup_initsvn |
8 setup_gitsvn | 8 setup_gitsvn |
9 | 9 |
10 ( | 10 ( |
11 set -e | 11 set -e |
12 cd git-svn | 12 cd git-svn |
13 | 13 |
14 cat > .git/hooks/post-cl-dcommit << _EOF | 14 cat > .git/hooks/post-cl-dcommit << _EOF |
15 #!/bin/bash | 15 #!/bin/bash |
16 git branch -m COMMITTED | 16 git branch -m COMMITTED |
17 _EOF | 17 _EOF |
18 chmod +x .git/hooks/post-cl-dcommit | 18 chmod +x .git/hooks/post-cl-dcommit |
19 | 19 |
20 git config rietveld.server localhost:1 | 20 git config rietveld.server localhost:1 |
21 git checkout -q --track -b work | 21 git checkout -q --track -b work |
22 echo "some work done" >> test | 22 echo "some work done" >> test |
23 git add test; git commit -q -m "work" | 23 git add test; git commit -q -m "work \ |
| 24 TBR=foo" |
24 | 25 |
25 test_expect_success "dcommitted code" \ | 26 test_expect_success "dcommitted code" \ |
26 "$GIT_CL dcommit -f --tbr --bypass-hooks -m 'dcommit'" | 27 "$GIT_CL dcommit -f --bypass-hooks -m 'dcommit'" |
27 | 28 |
28 test_expect_success "post-cl-dcommit hook executed" \ | 29 test_expect_success "post-cl-dcommit hook executed" \ |
29 "git symbolic-ref HEAD | grep -q COMMITTED" | 30 "git symbolic-ref HEAD | grep -q COMMITTED" |
30 ) | 31 ) |
31 SUCCESS=$? | 32 SUCCESS=$? |
32 | 33 |
33 cleanup | 34 cleanup |
34 | 35 |
35 if [ $SUCCESS == 0 ]; then | 36 if [ $SUCCESS == 0 ]; then |
36 echo PASS | 37 echo PASS |
37 fi | 38 fi |
OLD | NEW |