Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
|
cmp
2012/09/25 01:04:24
need some lines here like:
# Copyright (c) 2012 T
szager1
2012/09/26 21:11:01
Done.
| |
| 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}` | |
| 10 if [ $? != 0 -o -z "$git_lkgr" ]; then | |
| 11 echo 'Could not map svn revision ${svn_lkgr} to a git commit.' | |
| 12 echo 'You may need to `git fetch`.' | |
| 13 exit 1 | |
| 14 fi | |
| 15 | |
| 16 set -o pipefail | |
| 17 closest_commit=`git rev-list --ancestry-path --grep='SVN changes up to revision [0-9]*' ${git_lkgr}..refs/remotes/origin/master | tail -1` | |
|
cmp
2012/09/25 01:04:24
nit: wrap at 80 chars
szager1
2012/09/26 21:11:01
Done.
| |
| 18 if [ $? != 0 -o -z "$closest_commit" ]; then | |
| 19 echo 'Could not find a blessed git commit (with accurate .DEPS.git and submodu les) after lkgr' | |
|
cmp
2012/09/25 01:04:24
nit: wrap at 80 chars
szager1
2012/09/26 21:11:01
Done.
| |
| 20 exit 1 | |
| 21 fi | |
| 22 | |
| 23 closest_svn_commit=`git rev-list -n 1 ${closest_commit}^1` | |
| 24 if [ $? != 0 -o -z "$closest_svn_commit" ]; then | |
| 25 echo 'I am thoroughly confused. Please send a bug report to chrome-infrastruc ture-team.' | |
|
cmp
2012/09/25 01:04:24
nit: wrap at 80 chars
let's use something like the
szager1
2012/09/26 21:11:01
Done.
| |
| 26 exit 1 | |
| 27 fi | |
| 28 | |
| 29 if [ "${closest_svn_commit}" = "${git_lkgr}" ]; then | |
| 30 echo "${closest_commit}" | |
| 31 exit 0 | |
| 32 else | |
| 33 echo "There is no master commit which corresponds exactly to lkgr." 1>&2 | |
| 34 echo "The closest commit is ${closest_commit}." 1>&2 | |
| 35 exit 1 | |
| 36 fi | |
| OLD | NEW |