| 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 # Abort on error. | 7 # Abort on error. |
| 8 set -e | 8 set -e |
| 9 | 9 |
| 10 export DEPOT_TOOLS_UPDATE=0 | 10 export DEPOT_TOOLS_UPDATE=0 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 svn cp -q -m 'branching' --parents $TRUNK_URL $BRANCH_URL | 43 svn cp -q -m 'branching' --parents $TRUNK_URL $BRANCH_URL |
| 44 } | 44 } |
| 45 | 45 |
| 46 # Set up a git-svn checkout of the repo. | 46 # Set up a git-svn checkout of the repo. |
| 47 setup_gitsvn() { | 47 setup_gitsvn() { |
| 48 echo "Setting up test git-svn repo..." | 48 echo "Setting up test git-svn repo..." |
| 49 rm -rf git-svn | 49 rm -rf git-svn |
| 50 # There appears to be no way to make git-svn completely shut up, so we | 50 # There appears to be no way to make git-svn completely shut up, so we |
| 51 # redirect its output. | 51 # redirect its output. |
| 52 git svn -q clone -s $REPO_URL git-svn >/dev/null 2>&1 | 52 git svn --prefix origin/ -q clone -s $REPO_URL git-svn >/dev/null 2>&1 |
| 53 ( | 53 ( |
| 54 cd git-svn | 54 cd git-svn |
| 55 git remote add origin https://example.com/fake_refspec |
| 55 git config user.name 'TestDood' | 56 git config user.name 'TestDood' |
| 56 git config user.email 'TestDood@example.com' | 57 git config user.email 'TestDood@example.com' |
| 57 ) | 58 ) |
| 58 } | 59 } |
| 59 | 60 |
| 60 # Set up a git-svn checkout of the repo and apply merge commits | 61 # Set up a git-svn checkout of the repo and apply merge commits |
| 61 # (like the submodule repo layout). | 62 # (like the submodule repo layout). |
| 62 setup_gitsvn_submodule() { | 63 setup_gitsvn_submodule() { |
| 63 echo "Setting up test remote git-svn-submodule repo..." | 64 echo "Setting up test remote git-svn-submodule repo..." |
| 64 rm -rf git-svn-submodule | 65 rm -rf git-svn-submodule |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 return $exit_code | 141 return $exit_code |
| 141 fi | 142 fi |
| 142 } | 143 } |
| 143 | 144 |
| 144 # Grab the XSRF token from the review server and print it to stdout. | 145 # Grab the XSRF token from the review server and print it to stdout. |
| 145 print_xsrf_token() { | 146 print_xsrf_token() { |
| 146 curl --cookie dev_appserver_login="test@example.com:False" \ | 147 curl --cookie dev_appserver_login="test@example.com:False" \ |
| 147 --header 'X-Requesting-XSRF-Token: 1' \ | 148 --header 'X-Requesting-XSRF-Token: 1' \ |
| 148 http://localhost:8080/xsrf_token 2>/dev/null | 149 http://localhost:8080/xsrf_token 2>/dev/null |
| 149 } | 150 } |
| OLD | NEW |