Commit a2e54c17 authored by mmoss@chromium.org's avatar mmoss@chromium.org

Add some more context to git-drover tutorial.

BUG=407284
R=iannucci@google.com

Review URL: https://codereview.chromium.org/507513002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291619 0039d316-1c4b-4281-b951-d872f2087c98
parent 19f1c459
......@@ -771,6 +771,23 @@ ease the develpment workflow.</p></div>
<div class="paragraph"><p>A tutorial for these tools can be found at <a href="depot_tools_tutorial.html">depot_tools_tutorial(7)</a>.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<a href="git-cherry-pick-upload.html">git-cherry-pick-upload(1)</a>
</dt>
<dd>
<p>
Upload the diff between a revision and its parent to rietveld.
</p>
</dd>
<dt class="hdlist1">
<a href="git-drover.html">git-drover(1)</a>
</dt>
<dd>
<p>
Apply a commit from the trunk to a release branch, or from one release branch to
another.
</p>
</dd>
<dt class="hdlist1">
<a href="git-freeze.html">git-freeze(1)</a>
</dt>
<dd>
......@@ -856,6 +873,14 @@ Alter the parentage (upstream) for the current branch.
</p>
</dd>
<dt class="hdlist1">
<a href="git-retry.html">git-retry(1)</a>
</dt>
<dd>
<p>
Bootstrap function to retry a git command.
</p>
</dd>
<dt class="hdlist1">
<a href="git-squash-branch.html">git-squash-branch(1)</a>
</dt>
<dd>
......@@ -886,7 +911,7 @@ Print a diff of the current branch, compared to its upstream.
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2014-04-10 14:23:11 PDT
Last updated 2014-08-25 16:31:24 PDT
</div>
</div>
</body>
......
......@@ -770,25 +770,36 @@ sequence of commands to run.</p></div>
<div class="sect1">
<h2 id="_example">EXAMPLE</h2>
<div class="sectionbody">
<div class="paragraph"><p> Before working with branches, you must 'gclient sync --with_branch_heads' at least once to fetch the branches.</p></div><div class="listingblock"><div class="content"><pre><code><span style="font-weight: bold; color: #ffffff">$ git log -n 1 --pretty=fuller</span>
commit 49fde8547a38bf27d38cbf3fac783cdf2ddc5f47
<div class="paragraph"><p> Before working with branches, you must 'gclient sync --with_branch_heads' at least once to fetch the branches.</p></div><div class="listingblock"><div class="content"><pre><code># Make sure we have the most up-to-date branch sources.
<span style="font-weight: bold; color: #ffffff">$ git fetch</span>
# Here's the commit we want to 'drover'.
<span style="font-weight: bold; color: #ffffff">$ git log -n 1 --pretty=fuller</span>
commit 19b478428049b956b2dc389893c9ed7c05d1b175
Author: some.committer &lt;some.committer@chromium.org&gt;
AuthorDate: Thu Apr 10 08:54:46 2014 +0000
Commit: some.committer &lt;some.committer@chromium.org&gt;
CommitDate: Thu Apr 10 08:54:46 2014 +0000
This change needs to go to branch 9999
# Checkout the branch we want to 'drover' to.
<span style="font-weight: bold; color: #ffffff">$ git checkout -b drover_9999 branch-heads/9999</span>
Branch drover_9999 set up to track remote ref refs/branch-heads/9999.
# DO NOT leave off the '-x' flag
<span style="font-weight: bold; color: #ffffff">$ git cherry-pick -x 49fde8547a38bf27d38cbf3fac783cdf2ddc5f47</span>
[drover_9999 1e33c2c] This change needs to go to branch 9999
# Now do the 'drover'.
# IMPORTANT!!! Do Not leave off the '-x' flag
<span style="font-weight: bold; color: #ffffff">$ git cherry-pick -x 19b478428049b956b2dc389893c9ed7c05d1b175</span>
[drover_9999 88e74e0] This change needs to go to branch 9999
Author: some.committer &lt;some.committer@chromium.org&gt;
Date: Thu Apr 10 08:54:46 2014 +0000
1 file changed, 1 insertion(+)
create mode 100644 modified_file
# That took the code authored by some.commiter and commited it to the
# branch by branch.maintainer (us).
<span style="font-weight: bold; color: #ffffff">$ git log -n 1 --pretty=fuller</span>
commit 1e33c2ccf642703a6c1c582210fe63980dc6c45b
commit 88e74e0f2540eba7bc7bd4d6adb4b0d7923c9488
Author: some.committer &lt;some.committer@chromium.org&gt;
AuthorDate: Thu Apr 10 08:54:46 2014 +0000
Commit: branch.maintainer &lt;branch.maintainer@chromium.org&gt;
......@@ -796,10 +807,13 @@ CommitDate: Thu Apr 10 09:11:36 2014 +0000
This change needs to go to branch 9999
(cherry picked from commit 49fde8547a38bf27d38cbf3fac783cdf2ddc5f47)
(cherry picked from commit 19b478428049b956b2dc389893c9ed7c05d1b175)
# Looks good. Ship it!
<span style="font-weight: bold; color: #ffffff">$ git cl upload</span>
# Get LGTM or TBR.
<span style="font-weight: bold; color: #ffffff">$ git cl land</span>
# Or skip the LGTM/TBR and just 'git cl land --bypass-hooks'
</code></pre></div></div><p><div class="paragraph"></p></div>
</div>
</div>
......@@ -821,7 +835,7 @@ from <a href="https://chromium.googlesource.com/chromium/tools/depot_tools.git">
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2014-08-20 16:12:01 PDT
Last updated 2014-08-25 16:45:38 PDT
</div>
</div>
</body>
......
......@@ -2,12 +2,12 @@
.\" Title: git-drover
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 08/20/2014
.\" Date: 08/25/2014
.\" Manual: Chromium depot_tools Manual
.\" Source: depot_tools b2c2b1c
.\" Source: depot_tools f0a4926
.\" Language: English
.\"
.TH "GIT\-DROVER" "1" "08/20/2014" "depot_tools b2c2b1c" "Chromium depot_tools Manual"
.TH "GIT\-DROVER" "1" "08/25/2014" "depot_tools f0a4926" "Chromium depot_tools Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
......@@ -46,25 +46,36 @@ Before working with branches, you must \*(Aqgclient sync \-\-with_branch_heads\*
.RS 4
.\}
.nf
# Make sure we have the most up\-to\-date branch sources\&.
\fB$ git fetch\fR
# Here\*(Aqs the commit we want to \*(Aqdrover\*(Aq\&.
\fB$ git log \-n 1 \-\-pretty=fuller\fR
commit d4bdf220b1b8d616ae71ab2d539f106f167c03e1
commit fd935aae549962611c2f178dc9026f23ae2ad9bd
Author: some\&.committer <some\&.committer@chromium\&.org>
AuthorDate: Thu Apr 10 08:54:46 2014 +0000
Commit: some\&.committer <some\&.committer@chromium\&.org>
CommitDate: Thu Apr 10 08:54:46 2014 +0000
This change needs to go to branch 9999
# Checkout the branch we want to \*(Aqdrover\*(Aq to\&.
\fB$ git checkout \-b drover_9999 branch\-heads/9999\fR
Branch drover_9999 set up to track remote ref refs/branch\-heads/9999\&.
# DO NOT leave off the \*(Aq\-x\*(Aq flag
\fB$ git cherry\-pick \-x d4bdf220b1b8d616ae71ab2d539f106f167c03e1\fR
[drover_9999 6356f5a] This change needs to go to branch 9999
# Now do the \*(Aqdrover\*(Aq\&.
# IMPORTANT!!! Do Not leave off the \*(Aq\-x\*(Aq flag
\fB$ git cherry\-pick \-x fd935aae549962611c2f178dc9026f23ae2ad9bd\fR
[drover_9999 0f36796] This change needs to go to branch 9999
Author: some\&.committer <some\&.committer@chromium\&.org>
Date: Thu Apr 10 08:54:46 2014 +0000
1 file changed, 1 insertion(+)
create mode 100644 modified_file
# That took the code authored by some\&.commiter and commited it to the
# branch by branch\&.maintainer (us)\&.
\fB$ git log \-n 1 \-\-pretty=fuller\fR
commit 6356f5a94785197320d59639e794b83783094329
commit 0f3679662379e7032957abcc7d63e96cec444ec7
Author: some\&.committer <some\&.committer@chromium\&.org>
AuthorDate: Thu Apr 10 08:54:46 2014 +0000
Commit: branch\&.maintainer <branch\&.maintainer@chromium\&.org>
......@@ -72,10 +83,13 @@ CommitDate: Thu Apr 10 09:11:36 2014 +0000
This change needs to go to branch 9999
(cherry picked from commit d4bdf220b1b8d616ae71ab2d539f106f167c03e1)
(cherry picked from commit fd935aae549962611c2f178dc9026f23ae2ad9bd)
# Looks good\&. Ship it!
\fB$ git cl upload\fR
# Get LGTM or TBR\&.
\fB$ git cl land\fR
# Or skip the LGTM/TBR and just \*(Aqgit cl land \-\-bypass\-hooks\*(Aq
.fi
.if n \{\
.RE
......
'\" t
.\" Title: depot_tools
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 04/10/2014
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 08/25/2014
.\" Manual: Chromium depot_tools Manual
.\" Source: depot_tools 68b1017
.\" Source: depot_tools 19f1c45
.\" Language: English
.\"
.TH "DEPOT_TOOLS" "7" "04/10/2014" "depot_tools 68b1017" "Chromium depot_tools Manual"
.TH "DEPOT_TOOLS" "7" "08/25/2014" "depot_tools 19f1c45" "Chromium depot_tools Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
......@@ -42,6 +42,16 @@ A listing of both categories of tools follows\&.
.sp
A tutorial for these tools can be found at \fBdepot_tools_tutorial\fR(7)\&.
.PP
\fBgit-cherry-pick-upload\fR(1)
.RS 4
Upload the diff between a revision and its parent to rietveld\&.
.RE
.PP
\fBgit-drover\fR(1)
.RS 4
Apply a commit from the trunk to a release branch, or from one release branch to another\&.
.RE
.PP
\fBgit-freeze\fR(1)
.RS 4
Freeze all changes on a branch (indexed and unindexed)\&.
......@@ -92,6 +102,11 @@ Rename a branch and correctly preserve all downstream relationships\&.
Alter the parentage (upstream) for the current branch\&.
.RE
.PP
\fBgit-retry\fR(1)
.RS 4
Bootstrap function to retry a git command\&.
.RE
.PP
\fBgit-squash-branch\fR(1)
.RS 4
Takes all commits in a single branch and replaces them with a single commit\&.
......
......@@ -18,11 +18,25 @@ comment Before working with branches, you must \'gclient sync \
set_user branch.maintainer
tick 1000
echo "# Make sure we have the most up-to-date branch sources."
run git fetch
echo
echo "# Here's the commit we want to 'drover'."
run git log -n 1 --pretty=fuller
echo
echo "# Checkout the branch we want to 'drover' to."
run git checkout -b drover_9999 branch-heads/9999
echo "# DO NOT leave off the '-x' flag"
echo
echo "# Now do the 'drover'."
echo "# IMPORTANT!!! Do Not leave off the '-x' flag"
run git cherry-pick -x $(git show-ref -s pick_commit)
echo
echo "# That took the code authored by some.commiter and commited it to the"
echo "# branch by branch.maintainer (us)."
run git log -n 1 --pretty=fuller
echo
echo "# Looks good. Ship it!"
pcommand git cl upload
echo "# Get LGTM or TBR."
run git cl land
echo "# Or skip the LGTM/TBR and just 'git cl land --bypass-hooks'"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment