Last active
October 2, 2015 07:58
Revisions
-
vishvananda revised this gist
Jul 3, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,8 +30,8 @@ git checkout $BRANCH git pull git branch -D bp-$1 git checkout -b bp-$1 git review -X $1 git review $BRANCH REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` HOST=`echo $REMOTE | cut -d':' -f1` -
vishvananda revised this gist
Jul 3, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ git pull git branch -D bp-$1 git checkout -b bp-$1 git review -X $BRANCH git review REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` HOST=`echo $REMOTE | cut -d':' -f1` -
vishvananda revised this gist
Jul 3, 2013 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,11 +28,9 @@ BRANCH=${2-milestone-proposed} git checkout $BRANCH git pull git branch -D bp-$1 git checkout -b bp-$1 git review -X $BRANCH git review $BRANCH REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` -
vishvananda revised this gist
Jun 26, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,9 +26,10 @@ fi BRANCH=${2-milestone-proposed} git checkout $BRANCH git pull git review -d $1 git checkout $BRANCH git branch -D bp-$1 git checkout -b bp-$1 git cherry-pick -x HEAD@{2} -
vishvananda revised this gist
Jun 11, 2012 . 1 changed file with 6 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ #!/usr/bin/env bash # This little script is to make backporting patches easier. # Instructions # ------------ # Make sure that <btranch> exists: # git branch -D <branch> # git checkout -b <branch> origin/<branch> # Grab the file and stick it in your <project> directory: # curl -OL https://raw.github.com/gist/2206428/bp.sh # Make sure the script is runnable: @@ -14,19 +13,9 @@ # ./bp.sh <review_number> # Recovering from errors # ---------------------- # If your branch fails to merge cleanly it is usually due to # a dependent branch not being in yet. In that case your best bet # is to wait for the dependent branch to merge and rerun the script. if [ -z "$1" ]; then echo "Usage: $0 <review_number> [branch]" @@ -39,6 +28,8 @@ BRANCH=${2-milestone-proposed} git review -d $1 git checkout $BRANCH git pull git branch -D bp-$1 git checkout -b bp-$1 git cherry-pick -x HEAD@{2} git review $BRANCH -
vishvananda revised this gist
Jun 11, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,7 @@ if [ -z "$1" ]; then exit 1 fi BRANCH=${2-milestone-proposed} git review -d $1 git checkout $BRANCH -
vishvananda revised this gist
May 10, 2012 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ # ------------ # Make sure that milestone-proposed exists and is up to date: # git branch -D milestone-proposed # git checkout -b <branch> origin/<branch> # git pull # Grab the file and stick it in your <project> directory: # curl -OL https://raw.github.com/gist/2206428/bp.sh @@ -29,11 +29,13 @@ # and rerun the script if [ -z "$1" ]; then echo "Usage: $0 <review_number> [branch]" echo " review_number: numeric review number from gerrit" echo " branch: target gerrit branch (defaults to milestone-proposed)" exit 1 fi BRANCH=${1-milestone-proposed} git review -d $1 git checkout $BRANCH -
vishvananda revised this gist
May 10, 2012 . 1 changed file with 9 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ #!/usr/bin/env bash # This is a little script to make backporting patches. # Instructions # ------------ # Make sure that milestone-proposed exists and is up to date: # git branch -D milestone-proposed # git checkout -b milestone-proposed origin/<branch> # git pull # Grab the file and stick it in your <project> directory: # curl -OL https://raw.github.com/gist/2206428/bp.sh @@ -22,22 +22,24 @@ # If your branch fails to merge cleanly it is usually due to # a dependent branch not being in yet. In that case your best bet # is to wait for the dependent branch to merge, then: # git checkout <branch> # git pull # git branch -D xxxx/xxxx/xxxx # git branch -D bp-<review_number> # and rerun the script if [ -z "$1" ]; then echo "Usage: $0 <review_number> [<branch=milestone-proposed>]" exit 1 fi $BRANCH=${1-milestone-proposed} git review -d $1 git checkout $BRANCH git checkout -b bp-$1 git cherry-pick -x HEAD@{2} git review $BRANCH REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` HOST=`echo $REMOTE | cut -d':' -f1` -
vishvananda revised this gist
Apr 4, 2012 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,9 +16,7 @@ # ---------------------- # If you have previously downloaded a branch you will see a failure # from git-review -d that branch xxxx/xxxx/xxxx already exists # to recover you will need to delete two branches: # git branch -D xxxx/xxxx/xxxx # git branch -D bp-<review_number> # If your branch fails to merge cleanly it is usually due to -
vishvananda revised this gist
Apr 4, 2012 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,23 @@ # chmod 755 bp.sh # Start backporting reviews: # ./bp.sh <review_number> # Recovering from errors # ---------------------- # If you have previously downloaded a branch you will see a failure # from git-review -d that branch xxxx/xxxx/xxxx already exists # to recover you will need to delete the branch # git branch -D xxxx/xxxx/xxxx # If you are re-backporting a branch you will need to do: # git branch -D xxxx/xxxx/xxxx # git branch -D bp-<review_number> # If your branch fails to merge cleanly it is usually due to # a dependent branch not being in yet. In that case your best bet # is to wait for the dependent branch to merge, then: # git checkout milestone-proposed # git pull # git branch -D xxxx/xxxx/xxxx # git branch -D bp-<review_number> # and rerun the script if [ -z "$1" ]; then echo "Usage: $0 <review_number>" -
vishvananda revised this gist
Apr 4, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,6 @@ git review milestone-proposed REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` HOST=`echo $REMOTE | cut -d':' -f1` SHA=`git rev-parse HEAD` echo "Use the following line to approve the review" echo "ssh -p $PORT $HOST gerrit review --code-review +2 --approved +1 $SHA" -
vishvananda revised this gist
Mar 30, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,6 @@ git review milestone-proposed REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` HOST=`echo $REMOTE | cut -d':' -f1` SHA=`git show-ref HEAD | cut -d' ' -f1` echo "Use the following line to approve the review" echo "ssh -p $PORT $HOST gerrit approve --submit $SHA" -
vishvananda revised this gist
Mar 28, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ # Make sure that milestone-proposed exists and is up to date: # git branch -D milestone-proposed # git checkout -b milestone-proposed origin/milestone-proposed # git pull # Grab the file and stick it in your <project> directory: # curl -OL https://raw.github.com/gist/2206428/bp.sh # Make sure the script is runnable: @@ -19,7 +20,6 @@ fi git review -d $1 git checkout milestone-proposed git checkout -b bp-$1 git cherry-pick HEAD@{2} git review milestone-proposed -
vishvananda revised this gist
Mar 26, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ #!/usr/bin/env bash # This is a little script to make backporting patches to milestone proposed. # Instructions # ------------ # Make sure that milestone-proposed exists and is up to date: # git branch -D milestone-proposed # git checkout -b milestone-proposed origin/milestone-proposed # Grab the file and stick it in your <project> directory: -
vishvananda revised this gist
Mar 26, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ # git branch -D milestone-proposed # git checkout -b milestone-proposed origin/milestone-proposed # Grab the file and stick it in your <project> directory: # curl -OL https://raw.github.com/gist/2206428/bp.sh # Make sure the script is runnable: # chmod 755 bp.sh # Start backporting reviews: -
vishvananda created this gist
Mar 26, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/usr/bin/env bash # This is a little script to make backporting patches to milestone proposed. # Make sure that milestone-proposed exists and is up to date # git branch -D milestone-proposed # git checkout -b milestone-proposed origin/milestone-proposed # Grab the file and stick it in your <project> directory: # curl -OL # Make sure the script is runnable: # chmod 755 bp.sh # Start backporting reviews: # ./bp.sh <review_number> if [ -z "$1" ]; then echo "Usage: $0 <review_number>" exit 1 fi git review -d $1 git checkout milestone-proposed git pull git checkout -b bp-$1 git cherry-pick HEAD@{2} git review milestone-proposed REMOTE=`git remote show gerrit -n | grep Fetch | cut -d'/' -f3` PORT=`echo $REMOTE | cut -d':' -f2` HOST=`echo $REMOTE | cut -d':' -f1` SHA=`git show-ref HEAD | cut -d' ' -f1`" echo "Use the following line to approve the review" echo "ssh -p $PORT $HOST gerrit approve --submit $SHA