| 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 | 
|   11  |   11  | 
|   12 PWD=`pwd` |   12 PWD=`pwd` | 
|   13 REPO_URL=file://$PWD/svnrepo |   13 REPO_URL=file://$PWD/svnrepo | 
|   14 TRUNK_URL=$REPO_URL/trunk |   14 TRUNK_URL=$REPO_URL/trunk | 
|   15 BRANCH_URL=$REPO_URL/branches/some_branch |   15 BRANCH_URL=$REPO_URL/branches/some_branch | 
|   16 GITREPO_PATH=$PWD/gitrepo |   16 GITREPO_PATH=$PWD/gitrepo | 
|   17 GITREPO_URL=file://$GITREPO_PATH |   17 GITREPO_URL=file://$GITREPO_PATH | 
 |   18 PATH="$PWD/..:$PATH" | 
|   18 GIT_CL=$PWD/../git-cl |   19 GIT_CL=$PWD/../git-cl | 
 |   20 GIT_CL_STATUS="$GIT_CL status -f" | 
|   19  |   21  | 
|   20 # Set up an SVN repo that has a few commits to trunk. |   22 # Set up an SVN repo that has a few commits to trunk. | 
|   21 setup_initsvn() { |   23 setup_initsvn() { | 
|   22   echo "Setting up test SVN repo..." |   24   echo "Setting up test SVN repo..." | 
|   23   rm -rf svnrepo |   25   rm -rf svnrepo | 
|   24   svnadmin create svnrepo |   26   svnadmin create svnrepo | 
|   25   # Need this in order for Mac SnowLeopard to work |   27   # Need this in order for Mac SnowLeopard to work | 
|   26   echo "enable-rep-sharing = false" >> svnrepo/db/fsfs.conf |   28   echo "enable-rep-sharing = false" >> svnrepo/db/fsfs.conf | 
|   27  |   29  | 
|   28   svn mkdir -q -m 'creating trunk' --parents $TRUNK_URL |   30   svn mkdir -q -m 'creating trunk' --parents $TRUNK_URL | 
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  138     return $exit_code |  140     return $exit_code | 
|  139   fi |  141   fi | 
|  140 } |  142 } | 
|  141  |  143  | 
|  142 # Grab the XSRF token from the review server and print it to stdout. |  144 # Grab the XSRF token from the review server and print it to stdout. | 
|  143 print_xsrf_token() { |  145 print_xsrf_token() { | 
|  144   curl --cookie dev_appserver_login="test@example.com:False" \ |  146   curl --cookie dev_appserver_login="test@example.com:False" \ | 
|  145     --header 'X-Requesting-XSRF-Token: 1' \ |  147     --header 'X-Requesting-XSRF-Token: 1' \ | 
|  146     http://localhost:8080/xsrf_token 2>/dev/null |  148     http://localhost:8080/xsrf_token 2>/dev/null | 
|  147 } |  149 } | 
| OLD | NEW |