| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Check guessing the svn upstream branch. | 7 # Check guessing the svn upstream branch. |
| 8 | 8 |
| 9 set -e | 9 set -e |
| 10 | 10 |
| 11 . ./test-lib.sh | 11 . ./test-lib.sh |
| 12 | 12 |
| 13 setup_initsvn | 13 setup_initsvn |
| 14 setup_gitsvn | 14 setup_gitsvn |
| 15 | 15 |
| 16 ( | 16 ( |
| 17 set -e | 17 set -e |
| 18 cd git-svn | 18 cd git-svn |
| 19 | 19 |
| 20 git config rietveld.server localhost:8080 | 20 git config rietveld.server localhost:10000 |
| 21 | 21 |
| 22 for ref in refs/remotes/origin/trunk refs/remotes/origin/some_branch; do | 22 for ref in refs/remotes/origin/trunk refs/remotes/origin/some_branch; do |
| 23 git branch -f --set-upstream feature_branch $ref | 23 git branch -f --set-upstream feature_branch $ref |
| 24 git checkout -q feature_branch | 24 git checkout -q feature_branch |
| 25 test_expect_success "Guessing upstream branch for $ref" \ | 25 test_expect_success "Guessing upstream branch for $ref" \ |
| 26 "$GIT_CL upstream | egrep -q '^$ref$'" | 26 "$GIT_CL upstream | egrep -q '^$ref$'" |
| 27 git checkout -q master | 27 git checkout -q master |
| 28 done | 28 done |
| 29 ) | 29 ) |
| 30 | 30 |
| 31 SUCCESS=$? | 31 SUCCESS=$? |
| 32 | 32 |
| 33 cleanup | 33 cleanup |
| 34 | 34 |
| 35 if [ $SUCCESS == 0 ]; then | 35 if [ $SUCCESS == 0 ]; then |
| 36 echo PASS | 36 echo PASS |
| 37 fi | 37 fi |
| OLD | NEW |