[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 1 | '\" t |
| 2 | .\" Title: git-drover |
| 3 | .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 4 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> |
| 5 | .\" Date: 09/23/2015 |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 6 | .\" Manual: Chromium depot_tools Manual |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 7 | .\" Source: depot_tools 4549a59 |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 8 | .\" Language: English |
| 9 | .\" |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 10 | .TH "GIT\-DROVER" "1" "09/23/2015" "depot_tools 4549a59" "Chromium depot_tools Manual" |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 11 | .\" ----------------------------------------------------------------- |
| 12 | .\" * Define some portability stuff |
| 13 | .\" ----------------------------------------------------------------- |
| 14 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 | .\" http://bugs.debian.org/507673 |
| 16 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 | .ie \n(.g .ds Aq \(aq |
| 19 | .el .ds Aq ' |
| 20 | .\" ----------------------------------------------------------------- |
| 21 | .\" * set default formatting |
| 22 | .\" ----------------------------------------------------------------- |
| 23 | .\" disable hyphenation |
| 24 | .nh |
| 25 | .\" disable justification (adjust text to left margin only) |
| 26 | .ad l |
| 27 | .\" ----------------------------------------------------------------- |
| 28 | .\" * MAIN CONTENT STARTS HERE * |
| 29 | .\" ----------------------------------------------------------------- |
| 30 | .SH "NAME" |
| 31 | git-drover \- Apply a commit from the trunk to a release branch, or from one release branch to another\&. |
| 32 | .SH "SYNOPSIS" |
| 33 | .sp |
| 34 | .nf |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 35 | \fIgit drover\fR \-\-branch <branch> \-\-cherry\-pick <commit> |
| 36 | [\-\-parent_checkout <path\-to\-existing\-checkout>] |
| 37 | [\-\-verbose] [\-\-dry\-run] |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 38 | .fi |
| 39 | .sp |
| 40 | .SH "DESCRIPTION" |
| 41 | .sp |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 42 | git drover applies a commit to a release branch\&. It creates a new workdir from an existing checkout to avoid downloading a new checkout without affecting the existing checkout\&. Creating a workdir requires symlinks so this does not work on Windows\&. See the EXAMPLE section for the equivalent sequence of commands to run\&. |
| 43 | .sp |
| 44 | git drover does not support reverts\&. See the EXAMPLE section for the equivalent sequence of commands to run\&. |
| 45 | .SH "OPTIONS" |
| 46 | .PP |
| 47 | \-\-branch <branch> |
| 48 | .RS 4 |
| 49 | The branch to cherry\-pick the commit to\&. |
| 50 | .RE |
| 51 | .PP |
| 52 | \-\-cherry\-pick <commit> |
| 53 | .RS 4 |
| 54 | The commit to cherry\-pick\&. |
| 55 | .RE |
| 56 | .PP |
| 57 | \-\-parent_checkout |
| 58 | .RS 4 |
| 59 | The path to the chromium checkout to use as the source for a creating git\-new\-workdir workdir to use for cherry\-picking\&. If unspecified, the current directory is used\&. |
| 60 | .RE |
| 61 | .PP |
| 62 | \-v, \-\-verbose |
| 63 | .RS 4 |
| 64 | Enable verbose logging\&. |
| 65 | .RE |
| 66 | .PP |
| 67 | \-\-dry\-run |
| 68 | .RS 4 |
| 69 | Skip landing the cherry\-pick\&. Just ensure that the commit can be cherry\-picked into the branch\&. |
| 70 | .RE |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 71 | .SH "EXAMPLE" |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 72 | .SS "PREREQUISITES" |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 73 | .sp |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 74 | Before working with branches, you must \fIgclient sync \-\-with_branch_heads\fR at least once to fetch the branches\&. |
| 75 | .sp |
| 76 | .it 1 an-trap |
| 77 | .nr an-no-space-flag 1 |
| 78 | .nr an-break-flag 1 |
| 79 | .br |
| 80 | .ps +1 |
| 81 | \fBMerge Example\fR |
| 82 | .RS 4 |
| 83 | .sp |
| 84 | |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 85 | .sp |
| 86 | .if n \{\ |
| 87 | .RS 4 |
| 88 | .\} |
| 89 | .nf |
[email protected] | 6f9c7cf | 2014-09-09 21:06:30 | [diff] [blame] | 90 | # Here\*(Aqs a commit (from some\&.committer) that we want to \*(Aqdrover\*(Aq\&. |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 91 | \fB$ git log \-n 1 \-\-pretty=fuller\fR |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 92 | commit b5a049e34297f22a4ea63567b32e3290bb3f244c |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 93 | Author: some\&.committer <some\&.committer@chromium\&.org> |
| 94 | AuthorDate: Thu Apr 10 08:54:46 2014 +0000 |
| 95 | Commit: some\&.committer <some\&.committer@chromium\&.org> |
| 96 | CommitDate: Thu Apr 10 08:54:46 2014 +0000 |
| 97 | |
| 98 | This change needs to go to branch 9999 |
[email protected] | a2e54c1 | 2014-08-25 23:58:16 | [diff] [blame] | 99 | |
[email protected] | a2e54c1 | 2014-08-25 23:58:16 | [diff] [blame] | 100 | # Now do the \*(Aqdrover\*(Aq\&. |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 101 | \fB$ git drover \-\-branch 9999 \-\-cherry\-pick b5a049e34297f22a4ea63567b32e3290bb3f244c\fR |
| 102 | Going to cherry\-pick |
| 103 | """ |
| 104 | commit b5a049e34297f22a4ea63567b32e3290bb3f244c |
| 105 | Author: some\&.committer <some\&.committer@chromium\&.org> |
| 106 | Date: Thu Apr 10 08:54:46 2014 +0000 |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 107 | |
| 108 | This change needs to go to branch 9999 |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 109 | """ |
| 110 | to 9999\&. Continue (y/n)? y |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 111 | |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 112 | # A cl is uploaded to rietveld, where it can be reviewed before landing\&. |
[email protected] | a2e54c1 | 2014-08-25 23:58:16 | [diff] [blame] | 113 | |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 114 | About to land on 9999\&. Continue (y/n)? y |
| 115 | # The cherry\-pick cl is landed on the branch 9999\&. |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 116 | .fi |
| 117 | .if n \{\ |
| 118 | .RE |
| 119 | .\} |
| 120 | .sp |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 121 | .RE |
| 122 | .sp |
| 123 | .it 1 an-trap |
| 124 | .nr an-no-space-flag 1 |
| 125 | .nr an-break-flag 1 |
| 126 | .br |
| 127 | .ps +1 |
| 128 | \fBRevert Example\fR |
| 129 | .RS 4 |
| 130 | .sp |
| 131 | |
| 132 | .sp |
| 133 | .if n \{\ |
| 134 | .RS 4 |
| 135 | .\} |
| 136 | .nf |
| 137 | # Make sure we have the most up\-to\-date branch sources\&. |
| 138 | \fB$ git fetch\fR |
| 139 | |
| 140 | # Checkout the branch with the change we want to revert\&. |
| 141 | \fB$ git checkout \-b drover_9999 branch\-heads/9999\fR |
| 142 | Branch drover_9999 set up to track remote ref refs/branch\-heads/9999\&. |
| 143 | |
| 144 | # Here\*(Aqs the commit we want to revert\&. |
| 145 | \fB$ git log \-n 1\fR |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 146 | commit 215689406a8ca5813412becc6258509be903db59 |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 147 | Author: some\&.committer <some\&.committer@chromium\&.org> |
| 148 | Date: Thu Apr 10 08:54:46 2014 +0000 |
| 149 | |
| 150 | This change is horribly broken\&. |
| 151 | |
| 152 | # Now do the revert\&. |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 153 | \fB$ git revert 215689406a8ca5813412becc6258509be903db59\fR |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 154 | |
| 155 | # That reverted the change and committed the revert\&. |
| 156 | \fB$ git log \-n 1\fR |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 157 | commit 1efaf0e8b1c6c6afadfb37e15023b52b960ac2fd |
[email protected] | 6f9c7cf | 2014-09-09 21:06:30 | [diff] [blame] | 158 | Author: you <you@chromium\&.org> |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 159 | Date: Thu Apr 10 09:11:36 2014 +0000 |
| 160 | |
| 161 | Revert "This change is horribly broken\&." |
| 162 | |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 163 | This reverts commit 215689406a8ca5813412becc6258509be903db59\&. |
[email protected] | 4426785 | 2014-09-06 00:06:24 | [diff] [blame] | 164 | |
| 165 | # As with old drover, reverts are generally OK to commit without LGTM\&. |
| 166 | \fB$ git cl upload \-r some\&.committer@chromium\&.org \-\-send\-mail\fR |
| 167 | \fB$ git cl land \-\-bypass\-hooks\fR |
| 168 | .fi |
| 169 | .if n \{\ |
| 170 | .RE |
| 171 | .\} |
| 172 | .sp |
| 173 | .RE |
[email protected] | 900a33f | 2015-09-29 06:57:09 | [diff] [blame^] | 174 | .sp |
| 175 | .it 1 an-trap |
| 176 | .nr an-no-space-flag 1 |
| 177 | .nr an-break-flag 1 |
| 178 | .br |
| 179 | .ps +1 |
| 180 | \fBManual Merge Example\fR |
| 181 | .RS 4 |
| 182 | .sp |
| 183 | |
| 184 | .sp |
| 185 | .if n \{\ |
| 186 | .RS 4 |
| 187 | .\} |
| 188 | .nf |
| 189 | # Make sure we have the most up\-to\-date branch sources\&. |
| 190 | \fB$ git fetch\fR |
| 191 | |
| 192 | # Here\*(Aqs a commit (from some\&.committer) that we want to \*(Aqdrover\*(Aq\&. |
| 193 | \fB$ git log \-n 1 \-\-pretty=fuller\fR |
| 194 | commit 640f962733bfd2b9c44539a0d65952643750957e |
| 195 | Author: some\&.committer <some\&.committer@chromium\&.org> |
| 196 | AuthorDate: Thu Apr 10 08:54:46 2014 +0000 |
| 197 | Commit: some\&.committer <some\&.committer@chromium\&.org> |
| 198 | CommitDate: Thu Apr 10 08:54:46 2014 +0000 |
| 199 | |
| 200 | This change needs to go to branch 9999 |
| 201 | |
| 202 | # Checkout the branch we want to \*(Aqdrover\*(Aq to\&. |
| 203 | \fB$ git checkout \-b drover_9999 branch\-heads/9999\fR |
| 204 | Branch drover_9999 set up to track remote ref refs/branch\-heads/9999\&. |
| 205 | |
| 206 | # Now do the \*(Aqdrover\*(Aq\&. |
| 207 | # IMPORTANT!!! Do Not leave off the \*(Aq\-x\*(Aq flag |
| 208 | \fB$ git cherry\-pick \-x 640f962733bfd2b9c44539a0d65952643750957e\fR |
| 209 | [drover_9999 5f1ae97] This change needs to go to branch 9999 |
| 210 | Author: some\&.committer <some\&.committer@chromium\&.org> |
| 211 | Date: Thu Apr 10 08:54:46 2014 +0000 |
| 212 | 1 file changed, 1 insertion(+) |
| 213 | create mode 100644 modified_file |
| 214 | |
| 215 | # That took the code authored by some\&.committer and committed it to |
| 216 | # the branch by the person who drovered it (i\&.e\&. you)\&. |
| 217 | \fB$ git log \-n 1 \-\-pretty=fuller\fR |
| 218 | commit 5f1ae978a8d05c16d8ed812163b7aa927f028bf9 |
| 219 | Author: some\&.committer <some\&.committer@chromium\&.org> |
| 220 | AuthorDate: Thu Apr 10 08:54:46 2014 +0000 |
| 221 | Commit: you <you@chromium\&.org> |
| 222 | CommitDate: Thu Apr 10 09:11:36 2014 +0000 |
| 223 | |
| 224 | This change needs to go to branch 9999 |
| 225 | |
| 226 | (cherry picked from commit 640f962733bfd2b9c44539a0d65952643750957e) |
| 227 | |
| 228 | # Looks good\&. Ship it! |
| 229 | \fB$ git cl upload\fR |
| 230 | # Wait for LGTM or TBR it\&. |
| 231 | \fB$ git cl land\fR |
| 232 | # Or skip the LGTM/TBR and just \*(Aqgit cl land \-\-bypass\-hooks\*(Aq |
| 233 | .fi |
| 234 | .if n \{\ |
| 235 | .RE |
| 236 | .\} |
| 237 | .sp |
| 238 | .RE |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 239 | .SH "SEE ALSO" |
| 240 | .sp |
[email protected] | 6f9c7cf | 2014-09-09 21:06:30 | [diff] [blame] | 241 | \fBgit-cherry-pick\fR(1), \fBgit-revert\fR(1) |
[email protected] | 62e41c3 | 2014-08-20 23:23:28 | [diff] [blame] | 242 | .SH "CHROMIUM DEPOT_TOOLS" |
| 243 | .sp |
| 244 | Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools from \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&. |
| 245 | .SH "NOTES" |
| 246 | .IP " 1." 4 |
| 247 | here |
| 248 | .RS 4 |
| 249 | \%https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| 250 | .RE |