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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 git init -q | 93 git init -q |
94 git config user.name 'TestDood' | 94 git config user.name 'TestDood' |
95 git config user.email 'TestDood@example.com' | 95 git config user.email 'TestDood@example.com' |
96 echo "test" > test | 96 echo "test" > test |
97 git add test | 97 git add test |
98 git commit -qam "initial commit" | 98 git commit -qam "initial commit" |
99 echo "test2" >> test | 99 echo "test2" >> test |
100 git commit -qam "second commit" | 100 git commit -qam "second commit" |
101 # Hack: make sure master is not the current branch | 101 # Hack: make sure master is not the current branch |
102 # otherwise push will give a warning | 102 # otherwise push will give a warning |
103 git checkout -q -b foo | 103 git checkout -q --detach master |
104 ) | 104 ) |
105 } | 105 } |
106 | 106 |
107 # Set up a git checkout of the repo. | 107 # Set up a git checkout of the repo. |
108 setup_gitgit() { | 108 setup_gitgit() { |
109 echo "Setting up test git repo..." | 109 echo "Setting up test git repo..." |
110 rm -rf git-git | 110 rm -rf git-git |
111 git clone -q $GITREPO_URL git-git | 111 git clone -q $GITREPO_URL git-git |
112 ( | 112 ( |
113 cd git-git | 113 cd git-git |
(...skipping 27 matching lines...) Expand all Loading... |
141 return $exit_code | 141 return $exit_code |
142 fi | 142 fi |
143 } | 143 } |
144 | 144 |
145 # 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. |
146 print_xsrf_token() { | 146 print_xsrf_token() { |
147 curl --cookie dev_appserver_login="test@example.com:False" \ | 147 curl --cookie dev_appserver_login="test@example.com:False" \ |
148 --header 'X-Requesting-XSRF-Token: 1' \ | 148 --header 'X-Requesting-XSRF-Token: 1' \ |
149 http://localhost:10000/xsrf_token 2>/dev/null | 149 http://localhost:10000/xsrf_token 2>/dev/null |
150 } | 150 } |
OLD | NEW |