aboutsummaryrefslogtreecommitdiff
path: root/en/source/submit-patches.html
diff options
context:
space:
mode:
Diffstat (limited to 'en/source/submit-patches.html')
-rw-r--r--en/source/submit-patches.html60
1 files changed, 38 insertions, 22 deletions
diff --git a/en/source/submit-patches.html b/en/source/submit-patches.html
index 85244534..5620209e 100644
--- a/en/source/submit-patches.html
+++ b/en/source/submit-patches.html
@@ -56,7 +56,9 @@ made directly to that project, as described in <a
href="#upstream-projects">Upstream Projects</a>.</p>
</li>
</ul>
+
<h2 id="for-contributors">For contributors</h2>
+
<h3 id="authenticate-with-the-server">Authenticate with the server</h3>
<p>Before you can upload to Gerrit, you need to <a
href="https://android.googlesource.com/new-password">establish a password</a>
@@ -67,17 +69,19 @@ Authentication</a> for additional details.</p>
<h3 id="start-a-repo-branch">Start a repo branch</h3>
<p>For each change you intend to make, start a new branch within the relevant
git repository:</p>
-<pre><code>$ repo start NAME .
-</code></pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo start <var>NAME</var> .
+</pre>
<p>You can start several independent branches at the same time in the same
repository. The branch NAME is local to your workspace and will not be included
on gerrit or the final source tree.</p>
<h3 id="make-your-change">Make your change</h3>
<p>Once you have modified the source files (and validated them, please) commit
the changes to your local repository:</p>
-<pre><code>$ git add -A
-$ git commit -s
-</code></pre>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git add -A</code>
+<code class="devsite-terminal">git commit -s</code>
+</pre>
<p>Provide a detailed description of the change in your commit message. This
description will be pushed to the public AOSP repository, so please follow our
guidelines for writing changelist descriptions: </p>
@@ -102,19 +106,21 @@ may be important when another contributor works on this feature next year.</p>
</ul>
<p>Here is an example commit message:</p>
-<pre><code>short description on first line
+<pre class="devsite-click-to-copy">short description on first line
more detailed description of your patch,
which is likely to take up multiple lines.
-</code></pre>
+</pre>
<p>A unique change ID and your name and email as provided during <code>repo
init</code> will be automatically added to your commit message. </p>
+
<h3 id="upload-to-gerrit">Upload to gerrit</h3>
<p>Once you have committed your change to your personal history, upload it
to gerrit with</p>
-<pre><code>$ repo upload
-</code></pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo upload
+</pre>
<p>If you have started multiple branches in the same repository, you will
be prompted to select which one(s) to upload.</p>
<p>After a successful upload, repo will provide you the URL of a new page on
@@ -126,37 +132,45 @@ for your patch.</p>
<p>Suppose a reviewer has looked at your patch and requested a small
modification. You can amend your commit within git, which will result in a
new patch on gerrit with the same change ID as the original.</p>
-<p><em>Note that if you have made other commits since uploading this patch,
-you will need to manually move your git HEAD.</em></p>
-<pre><code>$ git add -A
-$ git commit --amend
-</code></pre>
+<aside class="note"><b>Note:</b> If you have made other commits since uploading this patch,
+ you will need to manually move your git HEAD.</aside>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git add -A</code>
+<code class="devsite-terminal">git commit --amend</code>
+</pre>
<p>When you upload the amended patch, it will replace the original on gerrit
and in your local git history.</p>
+
<h3 id="resolving-sync-conflicts">Resolving sync conflicts</h3>
<p>If other patches are submitted to the source tree that conflict with
yours, you will need to rebase your patch on top of the new HEAD of the
source repository. The easy way to do this is to run</p>
-<pre><code>$ repo sync
-</code></pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo sync
+</pre>
<p>This command first fetches the updates from the source server, then
attempts to automatically rebase your HEAD onto the new remote HEAD.</p>
<p>If the automatic rebase is unsuccessful, you will have to perform a
manual rebase.</p>
-<pre><code>$ repo rebase
-</code></pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo rebase
+</pre>
<p>Using <code>git mergetool</code> may help you deal with the rebase
conflict. Once you have successfully merged the conflicting files,</p>
-<pre><code>$ git rebase --continue
-</code></pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+git rebase --continue
+</pre>
<p>After either automatic or manual rebase is complete, run <code>repo
upload</code> to submit your rebased patch.</p>
+
<h3 id="after-a-submission-is-approved">After a submission is approved</h3>
<p>After a submission makes it through the review and verification process,
Gerrit automatically merges the change into the public repository. Other
users will be able to run <code>repo sync</code> to pull the update into
their local client.</p>
+
<h2 id="for-reviewers-and-verifiers">For reviewers and verifiers</h2>
+
<h3 id="reviewing-a-change">Reviewing a change</h3>
<p>If you are assigned to be the Approver for a change, you need to determine
the following:</p>
@@ -200,12 +214,14 @@ commands.</p>
"Fails," and add a message explaining what problems were identified.</p>
</li>
</ul>
+
<h3 id="downloading-changes-from-gerrit">Downloading changes from Gerrit</h3>
<p>A submission that has been verified and merged will be downloaded with
the next <code>repo sync</code>. If you wish to download a specific change
that has not yet been approved, run</p>
-<pre><code>$ repo download TARGET CHANGE
-</code></pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo download <var>TARGET CHANGE</var>
+</pre>
<p>where TARGET is the local directory into which the change should be
downloaded and CHANGE is the
change number as listed in <a