Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
| 2 | |
| 3 svn_lkgr=`curl -s http://chromium-status.appspot.com/lkgr` | |
| 4 if [ $? != 0 -o -z "$svn_lkgr" ]; then | |
| 5 echo 'Could not get svn lkgr from chromium-status.appspot.com/lkgr' | |
| 6 exit 1 | |
| 7 fi | |
| 8 | |
| 9 git_lkgr=`git svn find-rev r${svn_lkgr}` | |
|
Jeffrey Yasskin
2012/09/22 00:16:06
I'm guessing a `git svn fetch` before this line wo
szager1
2012/09/22 00:54:48
I'd prefer not run any `fetch` operations, to prev
| |
| 10 if [ $? != 0 -o -z "$git_lkgr" ]; then | |
| 11 echo 'Could not map svn revision ${svn_lkgr} to a git commit.' | |
| 12 exit 1 | |
| 13 fi | |
| 14 | |
| 15 closest_commit=`git rev-list --ancestry-path --grep='SVN changes up to revision [0-9]*' ${git_lkgr}..refs/remotes/origin/master | tail -1` | |
|
Jeffrey Yasskin
2012/09/22 00:16:06
set pipefail to make the exit status of this comma
szager1
2012/09/22 00:54:48
Done.
| |
| 16 if [ $? != 0 -o -z "$closest_commit" ]; then | |
| 17 echo 'Could not find a blessed git commit (with accurate .DEPS.git and submodu les) after lkgr' | |
| 18 exit 1 | |
| 19 fi | |
| 20 | |
| 21 closest_svn_commit=`git rev-list -n 1 ${closest_commit}^1` | |
| 22 if [ $? != 0 -o -z "$closest_svn_commit" ]; then | |
| 23 echo 'I am thoroughly confused. Please send a bug report to chrome-infrastruc ture-team.' | |
| 24 exit 1 | |
| 25 fi | |
| 26 | |
| 27 if [ "${closest_svn_commit}" = "${git_lkgr}" ]; then | |
| 28 echo "${closest_commit}" | |
| 29 exit 0 | |
| 30 else | |
| 31 echo "There is no master commit which corresponds exactly to lkgr." 1>&2 | |
| 32 echo "The closest commit is ${closest_commit}." 1>&2 | |
| 33 exit 1 | |
| 34 fi | |
| OLD | NEW |