mmoss@chromium.org | 4426785 | 2014-09-06 00:06:24 +0000 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | . git-drover.demo.common.sh |
| 3 | |
| 4 | echo "# Make sure we have the most up-to-date branch sources." |
| 5 | run git fetch |
| 6 | echo |
| 7 | echo "# Checkout the branch with the change we want to revert." |
| 8 | run git checkout -b drover_9999 branch-heads/9999 |
| 9 | echo |
| 10 | drover_c "This change is horribly broken." |
| 11 | echo "# Here's the commit we want to revert." |
| 12 | run git log -n 1 |
| 13 | echo |
| 14 | echo "# Now do the revert." |
| 15 | silent git revert --no-edit $(git show-ref -s pick_commit) |
| 16 | pcommand git revert $(git show-ref -s pick_commit) |
| 17 | echo |
| 18 | echo "# That reverted the change and committed the revert." |
| 19 | run git log -n 1 |
| 20 | echo |
| 21 | echo "# As with old drover, reverts are generally OK to commit without LGTM." |
| 22 | pcommand git cl upload -r some.committer@chromium.org --send-mail |
| 23 | run git cl land --bypass-hooks |