aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/dev
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-11-09 11:47:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-09 11:47:09 -0800
commit3a210bfd403815bebbc7efabe7bbd373e5a3d8f8 (patch)
treed898c261175fed3cfa626dc205d043865f4a3ad2 /site/dev
parenta267904213ee6220982918b4c4358988e3230dc5 (diff)
Documentation - Remove references to `gclient sync`
skia.org/user/download - Move sections "Making changes" and "Uploading changes for review" to "How to submit a patch" page - Mention bin/sync-and-gyp skia.org/dev/contrib/submit - Mention branch.autosetuprebase=always to fit with Skia's linear history style. NOTRY=true DOCS_PREVIEW= https://skia.org/user/download?cl=1411403010 DOCS_PREVIEW= https://skia.org/dev/contrib/submit?cl=1411403010 Review URL: https://codereview.chromium.org/1411403010
Diffstat (limited to 'site/dev')
-rw-r--r--site/dev/contrib/submit.md83
1 files changed, 49 insertions, 34 deletions
diff --git a/site/dev/contrib/submit.md b/site/dev/contrib/submit.md
index 724201d34c..69bb42c57a 100644
--- a/site/dev/contrib/submit.md
+++ b/site/dev/contrib/submit.md
@@ -2,29 +2,42 @@ How to submit a patch
=====================
+Configure git
+-------------
+
+<!--?prettify lang=sh?-->
+
+ git config --global user.name "Your Name"
+ git config --global user.email you@example.com
+
Making changes
--------------
First create a branch for your changes:
-~~~~
-$ git checkout -b my_feature origin/master
-~~~~
+<!--?prettify lang=sh?-->
+
+ git config branch.autosetuprebase always
+ git checkout -b my_feature origin/master
After making your changes, create a commit
-~~~~
-$ git add [file1] [file2] ...
-$ git commit
-~~~~
+<!--?prettify lang=sh?-->
+
+ git add [file1] [file2] ...
+ git commit
If your branch gets out of date, you will need to update it:
-~~~~
-$ git pull --rebase
-$ gclient sync
-~~~~
+<!--?prettify lang=sh?-->
+
+ git pull
+ python bin/sync-and-gyp
+<!--
+ python tools/git-sync-deps
+ python ./gyp_skia
+-->
Adding a unit test
------------------
@@ -34,7 +47,7 @@ time. Skia has a simple unittest framework so you can add a case to it.
Test code is located under the 'tests' directory.
-See [Writing Unit and Rendering Tests](tests) for details.
+See [Writing Unit and Rendering Tests](../testing/tests) for details.
Unit tests are best, but if your change touches rendering and you can't think of
an automated way to verify the results, consider writing a GM test or a new page
@@ -49,14 +62,16 @@ For your code to be accepted into the codebase, you must complete the
[Individual Contributor License
Agreement](http://code.google.com/legal/individual-cla-v1.0.html). You can do
this online, and it only takes a minute. If you are contributing on behalf of a
-corporation, you must fill out the [Corporate Contributor License Agreement](http://code.google.com/legal/corporate-cla-v1.0.html)
-and send it to us as described on that page. Add your (or your organization's)
+corporation, you must fill out the [Corporate Contributor License
+Agreement](http://code.google.com/legal/corporate-cla-v1.0.html)
+and send it to us as described on that page. Add your (or your organization's)
name and contact info to the AUTHORS file as a part of your CL.
Now that you've made a change and written a test for it, it's ready for the code
review! Submit a patch and getting it reviewed is fairly easy with depot tools.
-Use git-cl, which comes with [depot tools](http://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools).
+Use git-cl, which comes with [depot
+tools](http://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools).
For help, run git-cl help.
### Configuring git-cl
@@ -64,9 +79,9 @@ For help, run git-cl help.
Before using any git-cl commands you will need to configure it to point at the
correct code review server. This is accomplished with the following command:
-~~~~
-git cl config https://skia.googlesource.com/skia/+/master/codereview.settings
-~~~~
+<!--?prettify lang=sh?-->
+
+ git cl config https://skia.googlesource.com/skia/+/master/codereview.settings
### Find a reviewer
@@ -76,17 +91,18 @@ has been editing it.
### Uploading changes for review
-Skia uses Chromium's code review [site](http://codereview.chromium.org) and the
+Skia uses Chromium's code review [site](http://codereview.chromium.org) and the
Rietveld open source code review tool.
Use git cl to upload your change:
-~~~~
-$ git cl upload
-~~~~
+
+<!--?prettify lang=sh?-->
+
+ git cl upload
You may have to enter a Google Account username and password to authenticate
yourself to codereview.chromium.org. A free gmail account will do fine, or any
other type of Google account. It does not have to match the email address you
-configured using git config --global user.email above, but it can.
+configured using `git config --global user.email` above, but it can.
The command output should include a URL, similar to
(https://codereview.chromium.org/111893004/), indicating where your changelist
@@ -130,12 +146,10 @@ update.
If you need to update code the code on an already uploaded CL, simply edit the
code, commit it again locally, and then run git cl upload again e.g.
-~~~~
-echo "" > GOATS
-git add GOATS
-git commit -m 'add newline fix to GOATS'
-git cl upload
-~~~~
+ echo "GOATS" > whitespace.txt
+ git add whitespace.txt
+ git commit -m 'add GOATS fix to whitespace.txt'
+ git cl upload
Once you're ready for another review, use **Publish+Mail Comments** again to
send another notification (it is helpful to tell the review what you did with
@@ -146,12 +160,13 @@ _Note_: As you work through the review process, both you and your reviewers
should converse using the code review interface, and send notes using
**Publish+Mail Comments**.
+Once your change has received an LGTM, you can check the "Commit" box
+on the codereview page and it will be committed on your behalf.
+
Once your commit has gone in, you should delete the branch containing your change:
-~~~~
-$ git checkout master
-$ git branch -D my_feature
-~~~~
+ git checkout -q origin/master
+ git branch -D my_feature
Final Testing
@@ -201,7 +216,7 @@ the new codereview.
### Skia committers:
* tips on how to apply the externally provided patch are [here](./patch)
- * when landing externally contributed patches, please note the original
+ * when landing externally contributed patches, please note the original
contributor's identity (and provide a link to the original codereview) in the commit message
git-cl will squash all your commits into a single one with the description you used when you uploaded your change.