| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 rm -rf git-svn-submodule | 65 rm -rf git-svn-submodule |
| 66 git svn -q clone -s $REPO_URL git-svn-submodule >/dev/null 2>&1 | 66 git svn -q clone -s $REPO_URL git-svn-submodule >/dev/null 2>&1 |
| 67 svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ | 67 svn_revision=`svn info file://$PWD/svnrepo | grep ^Revision | \ |
| 68 sed s/^.*:// | xargs` | 68 sed s/^.*:// | xargs` |
| 69 ( | 69 ( |
| 70 cd git-svn-submodule | 70 cd git-svn-submodule |
| 71 git config user.name 'TestDood' | 71 git config user.name 'TestDood' |
| 72 git config user.email 'TestDood@example.com' | 72 git config user.email 'TestDood@example.com' |
| 73 echo 'merge-file line 1' > merge-file | 73 echo 'merge-file line 1' > merge-file |
| 74 git add merge-file; git commit -q -m 'First non-svn commit on master' | 74 git add merge-file; git commit -q -m 'First non-svn commit on master' |
| 75 git checkout -q refs/remotes/trunk | 75 git checkout -q refs/remotes/origin/trunk |
| 76 git merge -q --no-commit --no-ff refs/heads/master >/dev/null 2>&1 | 76 git merge -q --no-commit --no-ff refs/heads/master >/dev/null 2>&1 |
| 77 echo 'merge-edit-file line 1' > merge-edit-file | 77 echo 'merge-edit-file line 1' > merge-edit-file |
| 78 git add merge-edit-file | 78 git add merge-edit-file |
| 79 git commit -q -m "SVN changes up to revision $svn_revision" | 79 git commit -q -m "SVN changes up to revision $svn_revision" |
| 80 git update-ref refs/heads/master HEAD | 80 git update-ref refs/heads/master HEAD |
| 81 git checkout master | 81 git checkout master |
| 82 ) | 82 ) |
| 83 } | 83 } |
| 84 | 84 |
| 85 # Set up a git repo that has a few commits to master. | 85 # Set up a git repo that has a few commits to master. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |