| OLD | NEW |
| 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 ----------- |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 [postsubs="quotes"] | 149 [postsubs="quotes"] |
| 150 ---- | 150 ---- |
| 151 [white]**$** # get the code | 151 [white]**$** # get the code |
| 152 [white]**$** # In an empty directory: | 152 [white]**$** # In an empty directory: |
| 153 [white]**$ fetch {chromium,blink,...}** | 153 [white]**$ fetch {chromium,blink,...}** |
| 154 | 154 |
| 155 [white]**$** # Update third_party repos and run pre-compile hooks | 155 [white]**$** # Update third_party repos and run pre-compile hooks |
| 156 [white]**$ gclient sync** | 156 [white]**$ gclient sync** |
| 157 | 157 |
| 158 [white]**$** # Make a new change and upload it for review | 158 [white]**$** # Make a new change and upload it for review |
| 159 [white]**$ git new-branch branchname** | 159 [white]**$ git new-branch <branch_name>** |
| 160 [white]**$** # repeat: [edit, git add, git commit] | 160 [white]**$** # repeat: [edit, git add, git commit] |
| 161 [white]**$ git cl upload** | 161 [white]**$ git cl upload** |
| 162 | 162 |
| 163 [white]**$** # After change is reviewed, commit with the CQ | 163 [white]**$** # After change is reviewed, commit with the CQ |
| 164 [white]**$ git cl set_commit** | 164 [white]**$ git cl set_commit** |
| 165 [white]**$** # Note that the committed hash which lands will /not/ match the | 165 [white]**$** # Note that the committed hash which lands will /not/ match the |
| 166 [white]**$** # commit hashes of your local branch. | 166 [white]**$** # commit hashes of your local branch. |
| 167 ---- | 167 ---- |
| 168 | 168 |
| 169 | 169 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 181 | 181 |
| 182 When the `fetch` tool completes you should have the following in your working | 182 When the `fetch` tool completes you should have the following in your working |
| 183 directory: | 183 directory: |
| 184 | 184 |
| 185 [subs="quotes"] | 185 [subs="quotes"] |
| 186 ---- | 186 ---- |
| 187 [white]**.gclient** # A configuration file for you source checkout | 187 [white]**.gclient** # A configuration file for you source checkout |
| 188 [white]**src/** # Top-level Chromium source checkout. | 188 [white]**src/** # Top-level Chromium source checkout. |
| 189 ---- | 189 ---- |
| 190 | 190 |
| 191 If you are on linux, then you'll need to run: | 191 If you are on linux and fetching the code for the first time, then you'll need |
| 192 to run: |
| 192 | 193 |
| 193 [subs="specialcharacters,quotes"] | 194 [subs="specialcharacters,quotes"] |
| 194 ---- | 195 ---- |
| 195 [white]**$ cd src && ./build/install-build-deps.sh** | 196 [white]**$ cd src && ./build/install-build-deps.sh** |
| 196 ---- | 197 ---- |
| 197 | 198 |
| 198 And finally: | 199 And finally: |
| 199 | 200 |
| 200 [postsubs="quotes"] | 201 [postsubs="quotes"] |
| 201 ---- | 202 ---- |
| 202 [white]**$ gclient sync** | 203 [white]**$ gclient sync** |
| 203 ---- | 204 ---- |
| 204 | 205 |
| 205 This will pull all dependencies of the Chromium src checkout. You will need | 206 This will pull all dependencies of the Chromium src checkout. You will need |
| 206 to run this any time you update the main src checkout. | 207 to run this any time you update the main src checkout, including when you |
| 208 switch branches. |
| 207 | 209 |
| 208 | 210 |
| 209 CREATING / UPLOADING A CL | 211 CREATING / UPLOADING A CL |
| 210 ------------------------- | 212 ------------------------- |
| 211 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 |
| 212 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>>. |
| 213 | 215 |
| 214 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 |
| 215 begin a new CL, just: | 217 begin a new CL: |
| 216 | 218 |
| 217 [subs="specialcharacters,quotes"] | 219 [subs="specialcharacters,quotes"] |
| 218 ---- | 220 ---- |
| 219 [white]**$ git new-branch <branch_name>** | 221 [white]**$ git new-branch <branch_name>** |
| 220 ---- | 222 ---- |
| 221 | 223 |
| 222 This will create and checkout a new branch named `branch_name` which will track | 224 This will create and checkout a new branch named `branch_name` which will track |
| 223 the default upstream (which is `origin/master`). See linkgit:git-new-branch[1] | 225 the default upstream branch (`origin/master`). See |
| 224 for more features, such as the ability to track 'LKGR'. | 226 linkgit:git-new-branch[1] for more features. |
| 225 | 227 |
| 226 Commit as many changes as you like to this branch. When you want to upload it | 228 Commit as many changes as you like to this branch. When you want to upload it |
| 227 for review, run: | 229 for review, run: |
| 228 | 230 |
| 229 [subs="quotes"] | 231 [subs="quotes"] |
| 230 ---- | 232 ---- |
| 231 [white]**$ git cl upload** | 233 [white]**$ git cl upload** |
| 232 ---- | 234 ---- |
| 233 | 235 |
| 234 This will take the diff of your branch against its upstream (`origin/master`), | 236 This will take the diff of your branch against its upstream branch (in that |
| 235 and will post it to the link:https://codereview.chromium.org[Chromium code | 237 case origin/master), and will post it to the |
| 236 review site]. | 238 link:https://codereview.chromium.org[Chromium code review site]. |
| 237 | 239 |
| 238 | 240 |
| 239 UPDATING THE CODE | 241 UPDATING THE CODE |
| 240 ----------------- | 242 ----------------- |
| 241 Inevitably, you'll want to pull in changes from the main Chromium repo. This is | 243 Inevitably, you'll want to pull in changes from the main Chromium repo. This is |
| 242 pretty easy with 'depot_tools': | 244 pretty easy with 'depot_tools': |
| 243 | 245 |
| 244 [subs="quotes"] | 246 [subs="quotes"] |
| 245 ---- | 247 ---- |
| 246 [white]**$ git rebase-update** | 248 [white]**$ git rebase-update** |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 281 |
| 280 [NOTE] | 282 [NOTE] |
| 281 Running `git rebase-update` will update all your branches, but it will not | 283 Running `git rebase-update` will update all your branches, but it will not |
| 282 automatically run `gclient sync` to update your dependencies. | 284 automatically run `gclient sync` to update your dependencies. |
| 283 | 285 |
| 284 | 286 |
| 285 MANAGING MULTIPLE CLS | 287 MANAGING MULTIPLE CLS |
| 286 --------------------- | 288 --------------------- |
| 287 Sometimes you want to work on more than one CL at once (say, you have a CL | 289 Sometimes you want to work on more than one CL at once (say, you have a CL |
| 288 posted for review and want to work on something else). For each CL that you | 290 posted for review and want to work on something else). For each CL that you |
| 289 want to work on, just use `git new-branch <branchname>`. | 291 want to work on, just use `git new-branch <branch_name>`. |
| 290 | 292 |
| 291 Once you start to have more than one CL at a time, it can be easy to lose your | 293 Once you start to have more than one CL at a time, it can be easy to lose your |
| 292 bearings. Fortunately, 'depot_tools' has two tools to help you out: | 294 bearings. Fortunately, 'depot_tools' has two tools to help you out: |
| 293 | 295 |
| 294 [subs="specialcharacters,quotes,attributes"] | 296 [subs="specialcharacters,quotes,attributes"] |
| 295 ---- | 297 ---- |
| 296 [white]**$ git map** | 298 [white]**$ git map** |
| 297 [white blue-background]##*##{zwsp}[blue-background red]** 7dcfe47 ** [gree
n]##(##{zwsp}[aqua]**frozen_changes**{zwsp}[green]##)## [yellow]##2014-03-12## \
~ FREEZE.unindexed | 299 [white blue-background]##*##{zwsp}[blue-background red]** 7dcfe47 ** [gree
n]##(##{zwsp}[aqua]**frozen_changes**{zwsp}[green]##)## [yellow]##2014-03-12## \
~ FREEZE.unindexed |
| 298 * [red]**4b0c180** [yellow]##2014-03-12## \~ modfile | 300 * [red]**4b0c180** [yellow]##2014-03-12## \~ modfile |
| 299 * [red]**59a7cca** [yellow]##2014-03-12## \~ a deleted file | 301 * [red]**59a7cca** [yellow]##2014-03-12## \~ a deleted file |
| (...skipping 22 matching lines...) Expand all Loading... |
| 322 [green]#master# | 324 [green]#master# |
| 323 ---- | 325 ---- |
| 324 | 326 |
| 325 linkgit:git-map[1]:: | 327 linkgit:git-map[1]:: |
| 326 This tool shows you the history of all of your branches in a pseudo-graphical | 328 This tool shows you the history of all of your branches in a pseudo-graphical |
| 327 format. In particular, it will show you which commits all of your branches | 329 format. In particular, it will show you which commits all of your branches |
| 328 are on, which commit you currently have checked out, and more. Check out the | 330 are on, which commit you currently have checked out, and more. Check out the |
| 329 doc for the full details. | 331 doc for the full details. |
| 330 | 332 |
| 331 linkgit:git-map-branches[1]:: | 333 linkgit:git-map-branches[1]:: |
| 332 This tool just shows you which branches you have in your repo, and thier | 334 This tool just shows you which branches you have in your repo, and their |
| 333 upstream relationship to each other (as well as which branch you have checked | 335 upstream relationship to each other (as well as which branch you have checked |
| 334 out at the moment). | 336 out at the moment). |
| 335 | 337 |
| 336 Additionally, sometimes you need to switch between branches, but you've got work | 338 Additionally, sometimes you need to switch between branches, but you've got work |
| 337 in progress. You could use linkgit:git-stash[1], but that can be tricky to | 339 in progress. You could use linkgit:git-stash[1], but that can be tricky to |
| 338 manage because you need to remember which branches you stashed what changes on. | 340 manage because you need to remember which branches you stashed what changes on. |
| 339 Helpfully 'depot_tools' includes two tools which can greatly assist in case: | 341 Helpfully 'depot_tools' includes two tools which can greatly assist in case: |
| 340 | 342 |
| 341 linkgit:git-freeze[1] allows you to put the current branch in \'suspended | 343 linkgit:git-freeze[1] allows you to put the current branch in \'suspended |
| 342 animation' by committing your changes to a specially-named commit on the top of | 344 animation' by committing your changes to a specially-named commit on the top of |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 dependencies to pull in. This file also contains 'hooks'. | 424 dependencies to pull in. This file also contains 'hooks'. |
| 423 | 425 |
| 424 LKGR:: | 426 LKGR:: |
| 425 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 |
| 426 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 |
| 427 link:http://build.chromium.org[main Chromium waterfall]. | 429 link:http://build.chromium.org[main Chromium waterfall]. |
| 428 | 430 |
| 429 include::_footer.txt[] | 431 include::_footer.txt[] |
| 430 | 432 |
| 431 // vim: ft=asciidoc: | 433 // vim: ft=asciidoc: |
| OLD | NEW |