| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Abort on error. | 3 # Abort on error. |
| 4 set -e | 4 set -e |
| 5 | 5 |
| 6 PWD=`pwd` | 6 PWD=`pwd` |
| 7 REPO_URL=file://$PWD/svnrepo | 7 REPO_URL=file://$PWD/svnrepo |
| 8 GITREPO_PATH=$PWD/gitrepo | 8 GITREPO_PATH=$PWD/gitrepo |
| 9 GITREPO_URL=file://$GITREPO_PATH | 9 GITREPO_URL=file://$GITREPO_PATH |
| 10 GIT_CL=$PWD/../git-cl | 10 GIT_CL=$PWD/../git-cl |
| 11 | 11 |
| 12 # Set up an SVN repo that has a few commits to trunk. | 12 # Set up an SVN repo that has a few commits to trunk. |
| 13 setup_initsvn() { | 13 setup_initsvn() { |
| 14 echo "Setting up test SVN repo..." | 14 echo "Setting up test SVN repo..." |
| 15 rm -rf svnrepo | 15 rm -rf svnrepo |
| 16 svnadmin create svnrepo | 16 svnadmin create svnrepo |
| 17 | 17 |
| 18 # Need this in order for Mac SnowLeopard to work |
| 19 echo "enable-rep-sharing = false" >> svnrepo/db/fsfs.conf |
| 20 |
| 18 rm -rf svn | 21 rm -rf svn |
| 19 svn co -q $REPO_URL svn | 22 svn co -q $REPO_URL svn |
| 20 ( | 23 ( |
| 21 cd svn | 24 cd svn |
| 22 echo "test" > test | 25 echo "test" > test |
| 23 svn add -q test | 26 svn add -q test |
| 24 svn commit -q -m "initial commit" | 27 svn commit -q -m "initial commit" |
| 25 echo "test2" >> test | 28 echo "test2" >> test |
| 26 svn commit -q -m "second commit" | 29 svn commit -q -m "second commit" |
| 27 ) | 30 ) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 return $exit_code | 91 return $exit_code |
| 89 fi | 92 fi |
| 90 } | 93 } |
| 91 | 94 |
| 92 # Grab the XSRF token from the review server and print it to stdout. | 95 # Grab the XSRF token from the review server and print it to stdout. |
| 93 print_xsrf_token() { | 96 print_xsrf_token() { |
| 94 curl --cookie dev_appserver_login="test@example.com:False" \ | 97 curl --cookie dev_appserver_login="test@example.com:False" \ |
| 95 --header 'X-Requesting-XSRF-Token: 1' \ | 98 --header 'X-Requesting-XSRF-Token: 1' \ |
| 96 http://localhost:8080/xsrf_token 2>/dev/null | 99 http://localhost:8080/xsrf_token 2>/dev/null |
| 97 } | 100 } |
| OLD | NEW |