OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Check guessing the svn upstream branch. | 3 # Check guessing the svn upstream branch. |
4 | 4 |
5 set -e | 5 set -e |
6 | 6 |
7 . ./test-lib.sh | 7 . ./test-lib.sh |
8 | 8 |
9 setup_initsvn | 9 setup_initsvn |
10 setup_gitsvn | 10 setup_gitsvn |
11 | 11 |
12 ( | 12 ( |
13 set -e | 13 set -e |
14 cd git-svn | 14 cd git-svn |
15 | 15 |
16 git config rietveld.server localhost:8080 | 16 git config rietveld.server localhost:8080 |
17 | 17 |
18 for ref in refs/remotes/trunk refs/remotes/some_branch; do | 18 for ref in refs/remotes/trunk refs/remotes/some_branch; do |
19 git checkout -q -B feature_branch $ref | 19 git branch -f --set-upstream feature_branch $ref |
| 20 git checkout -q feature_branch |
20 test_expect_success "Guessing upstream branch for $ref" \ | 21 test_expect_success "Guessing upstream branch for $ref" \ |
21 "$GIT_CL upstream | egrep -q '^$ref$'" | 22 "$GIT_CL upstream | egrep -q '^$ref$'" |
22 git checkout -q master | 23 git checkout -q master |
23 done | 24 done |
24 ) | 25 ) |
25 | 26 |
26 SUCCESS=$? | 27 SUCCESS=$? |
27 | 28 |
28 cleanup | 29 cleanup |
29 | 30 |
30 if [ $SUCCESS == 0 ]; then | 31 if [ $SUCCESS == 0 ]; then |
31 echo PASS | 32 echo PASS |
32 fi | 33 fi |
OLD | NEW |