Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: docs/src/depot_tools_tutorial.txt

Issue 238203002: Move walkthrough to end of tutorial, add real TL;DR section. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docs/man7/depot_tools_tutorial.7 ('k') | docs/src/depot_tools_tutorial.demo.tldr.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 depot_tools_tutorial(7) 1 depot_tools_tutorial(7)
2 ======================= 2 =======================
3 3
4 NAME 4 NAME
5 ---- 5 ----
6 depot_tools_tutorial - A tutorial introduction to the Chromium depot_tools git 6 depot_tools_tutorial - A tutorial introduction to the Chromium depot_tools git
7 extensions. 7 extensions.
8 8
9 DESCRIPTION 9 DESCRIPTION
10 ----------- 10 -----------
11 11
12 The Chromium linkgit:depot_tools[7] suite contains many git workflow-enhancing 12 The Chromium linkgit:depot_tools[7] suite contains many git workflow-enhancing
13 tools which are designed to work together to enable anyone to wrangle the 13 tools which are designed to work together to enable anyone to wrangle the
14 Chromium codebase expertly. This tutorial explains how to do development on 14 Chromium codebase expertly. This tutorial explains how to do development on
15 Chromium using these tools. This will cover: 15 Chromium using these tools. This will cover:
16 16
17 * <<_setting_up,Setting up>> 17 * <<_setting_up,Setting up>>
18 * <<_getting_the_code,Getting the code>> 18 * <<_getting_the_code,Getting the code>>
19 * <<_tl_dr_walkthrough,TL;DR Walkthrough>> 19 * <<_tl_dr,TL;DR>>
20 * <<_creating_uploading_a_cl,Creating / Uploading a CL>> 20 * <<_creating_uploading_a_cl,Creating / Uploading a CL>>
21 * <<_updating_the_code,Updating the code>> 21 * <<_updating_the_code,Updating the code>>
22 * <<_managing_multiple_cls,Managing multiple CLs>> 22 * <<_managing_multiple_cls,Managing multiple CLs>>
23 * <<_managing_dependent_cls,Managing dependent CLs>> 23 * <<_managing_dependent_cls,Managing dependent CLs>>
24 * <<_example_walkthrough,Example Walkthrough>>
24 25
25 Please refer to the manpages (or `--help` output) for details about any of the 26 Please refer to the manpages (or `--help` output) for details about any of the
26 commands mentioned in this tutorial. 27 commands mentioned in this tutorial.
27 28
28 [NOTE] 29 [NOTE]
29 If your platform does not support manpages (or you prefer something a bit more 30 If your platform does not support manpages (or you prefer something a bit more
30 expressive than plain text) you can find all documentation in 'html' form in the 31 expressive than plain text) you can find all documentation in 'html' form in the
31 `[DEPOT_TOOLS]/docs/html` folder. 32 `[DEPOT_TOOLS]/docs/html` folder.
32 33
33 PREREQUISITES 34 PREREQUISITES
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 [subs="quotes,attributes"] 139 [subs="quotes,attributes"]
139 ---- 140 ----
140 [white]**$ git config --global user.name ``John Doe''** 141 [white]**$ git config --global user.name ``John Doe''**
141 [white]**$ git config --global user.email ``jdoe@email.com''** 142 [white]**$ git config --global user.email ``jdoe@email.com''**
142 [white]**$ git config --global core.autocrlf false** 143 [white]**$ git config --global core.autocrlf false**
143 [white]**$ git config --global core.filemode false** 144 [white]**$ git config --global core.filemode false**
144 [white]**$** # and for fun! 145 [white]**$** # and for fun!
145 [white]**$ git config --global color.ui true** 146 [white]**$ git config --global color.ui true**
146 ---- 147 ----
147 148
149 TL;DR
150 -----
151 [postsubs="quotes"]
152 ----
153 [white]**$** # get the code
154 [white]**$** # In an empty directory:
155 [white]**$ fetch {chromium,blink,...}**
156
157 [white]**$** # Update third_party repos and run pre-compile hooks
158 [white]**$ gclient sync**
159
160 [white]**$** # Make a new change and upload it for review
161 [white]**$ git new-branch branchname**
162 [white]**$** # repeat: [edit, git add, git commit]
163 [white]**$ git cl upload**
164
165 [white]**$** # After change is reviewed, commit with the CQ
166 [white]**$ git cl set_commit**
167 [white]**$** # Note that the committed hash which lands will /not/ match the
168 [white]**$** # commit hashes of your local branch.
169 ----
170
171
148 GETTING THE CODE 172 GETTING THE CODE
149 ---------------- 173 ----------------
150 Pick an empty directory and run one of the following: 174 Pick an empty directory and run one of the following:
151 175
152 [subs="quotes"] 176 [subs="quotes"]
153 ---- 177 ----
154 [white]**$ fetch chromium** # Basic checkout for desktop Chromium 178 [white]**$ fetch chromium** # Basic checkout for desktop Chromium
155 [white]**$ fetch blink** # Chromium code with Blink checked out to tip-of-tr ee 179 [white]**$ fetch blink** # Chromium code with Blink checked out to tip-of-tr ee
156 [white]**$ fetch android** # Chromium checkout for Android platform 180 [white]**$ fetch android** # Chromium checkout for Android platform
157 [white]**$ fetch ios** # Chromium checkout for iOS platform 181 [white]**$ fetch ios** # Chromium checkout for iOS platform
(...skipping 12 matching lines...) Expand all
170 194
171 [subs="specialcharacters,quotes"] 195 [subs="specialcharacters,quotes"]
172 ---- 196 ----
173 [white]**$ cd src && ./build/install-build-deps.sh** 197 [white]**$ cd src && ./build/install-build-deps.sh**
174 ---- 198 ----
175 199
176 And finally: 200 And finally:
177 201
178 [postsubs="quotes"] 202 [postsubs="quotes"]
179 ---- 203 ----
180 [white]**$ gclient sync** <1> 204 [white]**$ gclient sync**
181 ---- 205 ----
182 <1> This will pull all dependencies of the Chromium src checkout. You will need 206
207 This will pull all dependencies of the Chromium src checkout. You will need
183 to run this any time you update the main src checkout. 208 to run this any time you update the main src checkout.
184 209
185 210
186 TL;DR WALKTHROUGH
187 -----------------
188 This section will demo what a typical workflow looks like when writing, updating ,
189 and committing multiple CLs.
190
191 demo:tldr[]
192
193 So there you have the basic flow. Note that you don't 'have' to do chromium
194 development using these tools. Any git workflow is compatible, as long as
195 `git cl upload` is able to upload good patches.
196
197
198 CREATING / UPLOADING A CL 211 CREATING / UPLOADING A CL
199 ------------------------- 212 -------------------------
200 NOTE: The remainder of the tutorial assumes that your current working directory 213 NOTE: The remainder of the tutorial assumes that your current working directory
201 is the `src/` folder mentioned in <<_getting_the_code,Getting the code>>. 214 is the `src/` folder mentioned in <<_getting_the_code,Getting the code>>.
202 215
203 Each CL corresponds exactly with a single branch in git. Any time you want to 216 Each CL corresponds exactly with a single branch in git. Any time you want to
204 begin a new CL, just: 217 begin a new CL, just:
205 218
206 [subs="specialcharacters,quotes"] 219 [subs="specialcharacters,quotes"]
207 ---- 220 ----
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 Sometimes when dealing with dependent CLs, it turns out that you accidentally 385 Sometimes when dealing with dependent CLs, it turns out that you accidentally
373 based a branch on the wrong upstream, but since then you've committed changes to 386 based a branch on the wrong upstream, but since then you've committed changes to
374 it, or even based 'another' branch off of that one. Or you discover that you 387 it, or even based 'another' branch off of that one. Or you discover that you
375 have two independent CLs that would actually be much better off as dependent 388 have two independent CLs that would actually be much better off as dependent
376 CLs. In instances like these, you can check out the offending branch and use 389 CLs. In instances like these, you can check out the offending branch and use
377 linkgit:git-reparent-branch[1] to move it to track a different parent. Note that 390 linkgit:git-reparent-branch[1] to move it to track a different parent. Note that
378 this can also be used to move a branch from tracking `origin/master` to `lkgr` 391 this can also be used to move a branch from tracking `origin/master` to `lkgr`
379 or vice versa. 392 or vice versa.
380 393
381 394
395 EXAMPLE WALKTHROUGH
396 -------------------
397 This section will demo what a typical workflow looks like when writing,
398 updating, and committing multiple CLs.
399
400 demo:walkthrough[]
401
402 So there you have the basic flow. Note that you don't 'have' to do chromium
403 development using these tools. Any git workflow is compatible, as long as
404 `git cl upload` is able to upload good patches.
405
406
382 CONCLUSION 407 CONCLUSION
383 ---------- 408 ----------
384 Hopefully that gives you a good starting overview on Chromium development using 409 Hopefully that gives you a good starting overview on Chromium development using
385 'depot_tools'. If you have questions which weren't answered by this tutorial or 410 'depot_tools'. If you have questions which weren't answered by this tutorial or
386 the man pages for the tools (see the index of all tools here: 411 the man pages for the tools (see the index of all tools here:
387 linkgit:depot_tools[7]), please feel free to ask. 412 linkgit:depot_tools[7]), please feel free to ask.
388 413
389 414
390 GLOSSARY 415 GLOSSARY
391 -------- 416 --------
392 417
393 CL:: 418 CL::
394 A 'change-list'. This is a diff which you would like to commit to the 419 A 'change-list'. This is a diff which you would like to commit to the
395 codebase. 420 codebase.
396 421
397 DEPS:: 422 DEPS::
398 A file in the chromium checkout which `gclient sync` uses to determine what 423 A file in the chromium checkout which `gclient sync` uses to determine what
399 dependencies to pull in. This file also contains 'hooks'. 424 dependencies to pull in. This file also contains 'hooks'.
400 425
401 LKGR:: 426 LKGR::
402 Last Known Good Revision. This is a linkgit:git-tag[1] which tracks the last 427 Last Known Good Revision. This is a linkgit:git-tag[1] which tracks the last
403 version of `origin/master` which has passed the full set of testing on the 428 version of `origin/master` which has passed the full set of testing on the
404 link:http://build.chromium.org[main Chromium waterfall]. 429 link:http://build.chromium.org[main Chromium waterfall].
405 430
406 include::_footer.txt[] 431 include::_footer.txt[]
407 432
408 // vim: ft=asciidoc: 433 // vim: ft=asciidoc:
OLDNEW
« no previous file with comments | « docs/man7/depot_tools_tutorial.7 ('k') | docs/src/depot_tools_tutorial.demo.tldr.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698