| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 | |
| 3 # Check that abandoning a branch also abandons its issue. | |
| 4 | |
| 5 set -e | |
| 6 | |
| 7 . ./test-lib.sh | |
| 8 | |
| 9 setup_initsvn | |
| 10 setup_gitsvn | |
| 11 | |
| 12 ( | |
| 13 set -e | |
| 14 cd git-svn | |
| 15 git config rietveld.server localhost:8080 | |
| 16 | |
| 17 # Create a branch and give it an issue. | |
| 18 git checkout -q -b abandoned | |
| 19 echo "some work done on a branch" >> test | |
| 20 git add test; git commit -q -m "branch work" | |
| 21 export EDITOR=/bin/true | |
| 22 test_expect_success "upload succeeds" \ | |
| 23 "$GIT_CL upload -m test master... | grep -q 'Issue created'" | |
| 24 | |
| 25 # Switch back to master, delete the branch. | |
| 26 git checkout master | |
| 27 git branch -D abandoned | |
| 28 | |
| 29 # Verify that "status" doesn't know about it anymore. | |
| 30 # The "exit" trickiness is inverting the exit status of grep. | |
| 31 test_expect_success "git-cl status dropped abandoned branch" \ | |
| 32 "$GIT_CL status | grep -q abandoned && exit 1 || exit 0" | |
| 33 ) | |
| 34 | |
| 35 SUCCESS=$? | |
| 36 | |
| 37 cleanup | |
| 38 | |
| 39 if [ $SUCCESS == 0 ]; then | |
| 40 echo PASS | |
| 41 fi | |
| OLD | NEW |