OLD | NEW |
1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
2 . git-drover.demo.common.sh | 2 . git-drover.demo.common.sh |
3 | 3 |
4 drover_c "This change needs to go to branch 9999" | 4 drover_c "This change needs to go to branch 9999" |
5 | 5 |
6 echo "# Make sure we have the most up-to-date branch sources." | |
7 run git fetch | |
8 echo | |
9 echo "# Here's a commit (from some.committer) that we want to 'drover'." | 6 echo "# Here's a commit (from some.committer) that we want to 'drover'." |
10 run git log -n 1 --pretty=fuller | 7 run git log -n 1 --pretty=fuller |
11 echo | 8 echo |
12 echo "# Checkout the branch we want to 'drover' to." | 9 echo "# Now do the 'drover'." |
13 run git checkout -b drover_9999 branch-heads/9999 | 10 pcommand git drover --branch 9999 \ |
| 11 --cherry-pick $(git show-ref -s pick_commit) |
| 12 |
| 13 echo "Going to cherry-pick" |
| 14 echo '"""' |
| 15 output git log -n 1 |
| 16 echo '"""' |
| 17 echo "to 9999. Continue (y/n)? y" |
14 echo | 18 echo |
15 echo "# Now do the 'drover'." | 19 echo "# A cl is uploaded to rietveld, where it can be reviewed before landing." |
16 echo "# IMPORTANT!!! Do Not leave off the '-x' flag" | |
17 run git cherry-pick -x $(git show-ref -s pick_commit) | |
18 echo | 20 echo |
19 echo "# That took the code authored by some.committer and committed it to" | 21 echo "About to land on 9999. Continue (y/n)? y" |
20 echo "# the branch by the person who drovered it (i.e. you)." | 22 echo "# The cherry-pick cl is landed on the branch 9999." |
21 run git log -n 1 --pretty=fuller | |
22 echo | |
23 echo "# Looks good. Ship it!" | |
24 pcommand git cl upload | |
25 echo "# Wait for LGTM or TBR it." | |
26 run git cl land | |
27 echo "# Or skip the LGTM/TBR and just 'git cl land --bypass-hooks'" | |
OLD | NEW |