blob: 2041fa18ec3eb162de5e4096fe922b0d020708a6 [file] [log] [blame]
[email protected]62e41c32014-08-20 23:23:281'\" t
2.\" Title: git-drover
3.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
[email protected]900a33f2015-09-29 06:57:094.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\" Date: 09/23/2015
[email protected]62e41c32014-08-20 23:23:286.\" Manual: Chromium depot_tools Manual
[email protected]900a33f2015-09-29 06:57:097.\" Source: depot_tools 4549a59
[email protected]62e41c32014-08-20 23:23:288.\" Language: English
9.\"
[email protected]900a33f2015-09-29 06:57:0910.TH "GIT\-DROVER" "1" "09/23/2015" "depot_tools 4549a59" "Chromium depot_tools Manual"
[email protected]62e41c32014-08-20 23:23:2811.\" -----------------------------------------------------------------
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"
31git-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]900a33f2015-09-29 06:57:0935\fIgit drover\fR \-\-branch <branch> \-\-cherry\-pick <commit>
36 [\-\-parent_checkout <path\-to\-existing\-checkout>]
37 [\-\-verbose] [\-\-dry\-run]
[email protected]62e41c32014-08-20 23:23:2838.fi
39.sp
40.SH "DESCRIPTION"
41.sp
[email protected]900a33f2015-09-29 06:57:0942git 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
44git 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
49The branch to cherry\-pick the commit to\&.
50.RE
51.PP
52\-\-cherry\-pick <commit>
53.RS 4
54The commit to cherry\-pick\&.
55.RE
56.PP
57\-\-parent_checkout
58.RS 4
59The 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
64Enable verbose logging\&.
65.RE
66.PP
67\-\-dry\-run
68.RS 4
69Skip landing the cherry\-pick\&. Just ensure that the commit can be cherry\-picked into the branch\&.
70.RE
[email protected]62e41c32014-08-20 23:23:2871.SH "EXAMPLE"
[email protected]44267852014-09-06 00:06:2472.SS "PREREQUISITES"
[email protected]62e41c32014-08-20 23:23:2873.sp
[email protected]44267852014-09-06 00:06:2474Before 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]62e41c32014-08-20 23:23:2885.sp
86.if n \{\
87.RS 4
88.\}
89.nf
[email protected]6f9c7cf2014-09-09 21:06:3090# Here\*(Aqs a commit (from some\&.committer) that we want to \*(Aqdrover\*(Aq\&.
[email protected]62e41c32014-08-20 23:23:2891\fB$ git log \-n 1 \-\-pretty=fuller\fR
[email protected]900a33f2015-09-29 06:57:0992commit b5a049e34297f22a4ea63567b32e3290bb3f244c
[email protected]62e41c32014-08-20 23:23:2893Author: some\&.committer <some\&.committer@chromium\&.org>
94AuthorDate: Thu Apr 10 08:54:46 2014 +0000
95Commit: some\&.committer <some\&.committer@chromium\&.org>
96CommitDate: Thu Apr 10 08:54:46 2014 +0000
97
98 This change needs to go to branch 9999
[email protected]a2e54c12014-08-25 23:58:1699
[email protected]a2e54c12014-08-25 23:58:16100# Now do the \*(Aqdrover\*(Aq\&.
[email protected]900a33f2015-09-29 06:57:09101\fB$ git drover \-\-branch 9999 \-\-cherry\-pick b5a049e34297f22a4ea63567b32e3290bb3f244c\fR
102Going to cherry\-pick
103"""
104commit b5a049e34297f22a4ea63567b32e3290bb3f244c
105Author: some\&.committer <some\&.committer@chromium\&.org>
106Date: Thu Apr 10 08:54:46 2014 +0000
[email protected]62e41c32014-08-20 23:23:28107
108 This change needs to go to branch 9999
[email protected]900a33f2015-09-29 06:57:09109"""
110to 9999\&. Continue (y/n)? y
[email protected]62e41c32014-08-20 23:23:28111
[email protected]900a33f2015-09-29 06:57:09112# A cl is uploaded to rietveld, where it can be reviewed before landing\&.
[email protected]a2e54c12014-08-25 23:58:16113
[email protected]900a33f2015-09-29 06:57:09114About to land on 9999\&. Continue (y/n)? y
115# The cherry\-pick cl is landed on the branch 9999\&.
[email protected]62e41c32014-08-20 23:23:28116.fi
117.if n \{\
118.RE
119.\}
120.sp
[email protected]44267852014-09-06 00:06:24121.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
142Branch 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]900a33f2015-09-29 06:57:09146commit 215689406a8ca5813412becc6258509be903db59
[email protected]44267852014-09-06 00:06:24147Author: some\&.committer <some\&.committer@chromium\&.org>
148Date: Thu Apr 10 08:54:46 2014 +0000
149
150 This change is horribly broken\&.
151
152# Now do the revert\&.
[email protected]900a33f2015-09-29 06:57:09153\fB$ git revert 215689406a8ca5813412becc6258509be903db59\fR
[email protected]44267852014-09-06 00:06:24154
155# That reverted the change and committed the revert\&.
156\fB$ git log \-n 1\fR
[email protected]900a33f2015-09-29 06:57:09157commit 1efaf0e8b1c6c6afadfb37e15023b52b960ac2fd
[email protected]6f9c7cf2014-09-09 21:06:30158Author: you <you@chromium\&.org>
[email protected]44267852014-09-06 00:06:24159Date: Thu Apr 10 09:11:36 2014 +0000
160
161 Revert "This change is horribly broken\&."
162
[email protected]900a33f2015-09-29 06:57:09163 This reverts commit 215689406a8ca5813412becc6258509be903db59\&.
[email protected]44267852014-09-06 00:06:24164
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]900a33f2015-09-29 06:57:09174.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
194commit 640f962733bfd2b9c44539a0d65952643750957e
195Author: some\&.committer <some\&.committer@chromium\&.org>
196AuthorDate: Thu Apr 10 08:54:46 2014 +0000
197Commit: some\&.committer <some\&.committer@chromium\&.org>
198CommitDate: 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
204Branch 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
218commit 5f1ae978a8d05c16d8ed812163b7aa927f028bf9
219Author: some\&.committer <some\&.committer@chromium\&.org>
220AuthorDate: Thu Apr 10 08:54:46 2014 +0000
221Commit: you <you@chromium\&.org>
222CommitDate: 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]62e41c32014-08-20 23:23:28239.SH "SEE ALSO"
240.sp
[email protected]6f9c7cf2014-09-09 21:06:30241\fBgit-cherry-pick\fR(1), \fBgit-revert\fR(1)
[email protected]62e41c32014-08-20 23:23:28242.SH "CHROMIUM DEPOT_TOOLS"
243.sp
244Part 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
247here
248.RS 4
249\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
250.RE