|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 16-Feb-2021 | - |
| bootstrap/ | H | 03-May-2022 | - | 727 | 559 |
| external_bin/gsutil/gsutil_4.28/gsutil/ | H | 16-Feb-2021 | - | 403,941 | 307,155 |
| fetch_configs/ | H | 16-Feb-2021 | - | 1,174 | 735 |
| git-templates/ | H | 16-Feb-2021 | - | 66 | 31 |
| infra/ | H | 16-Feb-2021 | - | 39 | 33 |
| man/ | H | 16-Feb-2021 | - | 4,893 | 4,046 |
| python-bin/ | H | 16-Feb-2021 | - | 8 | 4 |
| python2-bin/ | H | 16-Feb-2021 | - | 8 | 4 |
| recipes/ | H | 03-May-2022 | - | 26,361 | 23,881 |
| testing_support/ | H | 16-Feb-2021 | - | 2,169 | 1,711 |
| tests/ | H | 03-May-2022 | - | 23,121 | 19,133 |
| third_party/ | H | 16-Feb-2021 | - | 13,810 | 10,396 |
| win_toolchain/ | H | 16-Feb-2021 | - | 1,218 | 962 |
| zsh-goodies/ | H | 16-Feb-2021 | - | 22 | 18 |
| .cipd_impl.ps1 | H A D | 16-Feb-2021 | 5.3 KiB | 197 | 142 |
| .gitattributes | H A D | 16-Feb-2021 | 1.5 KiB | 56 | 46 |
| .gitignore | H A D | 16-Feb-2021 | 1.7 KiB | 93 | 79 |
| .style.yapf | H A D | 16-Feb-2021 | 65 | 5 | 4 |
| .vpython | H A D | 16-Feb-2021 | 1.3 KiB | 63 | 58 |
| .vpython3 | H A D | 16-Feb-2021 | 562 | 31 | 27 |
| CROS_OWNERS | H A D | 16-Feb-2021 | 196 | 8 | 7 |
| GOMA_OWNERS | H A D | 16-Feb-2021 | 173 | 10 | 9 |
| LICENSE | H A D | 16-Feb-2021 | 1.5 KiB | 28 | 27 |
| LUCI_OWNERS | H A D | 16-Feb-2021 | 121 | 7 | 6 |
| OWNERS | H A D | 16-Feb-2021 | 1 KiB | 41 | 31 |
| PRESUBMIT.py | H A D | 16-Feb-2021 | 5.1 KiB | 151 | 115 |
| README.gclient.md | H A D | 16-Feb-2021 | 3.5 KiB | 68 | 57 |
| README.git-cl.md | H A D | 16-Feb-2021 | 4.1 KiB | 100 | 72 |
| README.md | H A D | 16-Feb-2021 | 2.8 KiB | 79 | 55 |
| WATCHLISTS | H A D | 16-Feb-2021 | 534 | 27 | 21 |
| auth.py | H A D | 16-Feb-2021 | 5 KiB | 164 | 111 |
| autoninja | H A D | 16-Feb-2021 | 1.1 KiB | 37 | 18 |
| autoninja.bat | H A D | 16-Feb-2021 | 1.7 KiB | 45 | 34 |
| autoninja.py | H A D | 16-Feb-2021 | 6.6 KiB | 170 | 87 |
| bb | H A D | 16-Feb-2021 | 320 | 13 | 4 |
| bb.bat | H A D | 16-Feb-2021 | 247 | 8 | 6 |
| bootstrap_python3 | H A D | 16-Feb-2021 | 982 | 36 | 25 |
| breakpad.py | H A D | 16-Feb-2021 | 485 | 13 | 7 |
| cbuildbot | H A D | 16-Feb-2021 | 2.6 KiB | 88 | 57 |
| chrome_set_ver | H A D | 16-Feb-2021 | 2.6 KiB | 88 | 57 |
| cipd | H A D | 16-Feb-2021 | 6.6 KiB | 248 | 184 |
| cipd.bat | H A D | 16-Feb-2021 | 1.8 KiB | 68 | 54 |
| cipd_bin_setup.bat | H A D | 16-Feb-2021 | 288 | 7 | 5 |
| cipd_bin_setup.sh | H A D | 16-Feb-2021 | 611 | 23 | 16 |
| cipd_client_version | H A D | 16-Feb-2021 | 54 | 2 | 1 |
| cipd_client_version.digests | H A D | 16-Feb-2021 | 1.5 KiB | 23 | 21 |
| cipd_manifest.versions | H A D | 16-Feb-2021 | 14.4 KiB | 439 | 329 |
| cit | H A D | 16-Feb-2021 | 275 | 9 | 2 |
| cit.bat | H A D | 16-Feb-2021 | 410 | 13 | 10 |
| cit.py | H A D | 16-Feb-2021 | 5 KiB | 168 | 124 |
| clang-format | H A D | 16-Feb-2021 | 280 | 9 | 2 |
| clang-format.bat | H A D | 16-Feb-2021 | 415 | 13 | 10 |
| clang_format.py | H A D | 16-Feb-2021 | 2.6 KiB | 80 | 55 |
| clang_format_merge_driver | H A D | 16-Feb-2021 | 293 | 9 | 2 |
| clang_format_merge_driver.bat | H A D | 16-Feb-2021 | 428 | 13 | 10 |
| clang_format_merge_driver.py | H A D | 16-Feb-2021 | 2.4 KiB | 70 | 43 |
| codereview.settings | H A D | 16-Feb-2021 | 265 | 7 | 6 |
| compile_single_file | H A D | 16-Feb-2021 | 298 | 9 | 2 |
| compile_single_file.bat | H A D | 16-Feb-2021 | 394 | 12 | 9 |
| compile_single_file.py | H A D | 16-Feb-2021 | 2.5 KiB | 77 | 45 |
| cpplint.bat | H A D | 16-Feb-2021 | 390 | 12 | 9 |
| cpplint.py | H A D | 16-Feb-2021 | 229.8 KiB | 6,098 | 3,975 |
| cpplint_chromium.py | H A D | 16-Feb-2021 | 2.3 KiB | 51 | 17 |
| cros | H A D | 16-Feb-2021 | 2.6 KiB | 88 | 57 |
| cros_sdk | H A D | 16-Feb-2021 | 2.6 KiB | 88 | 57 |
| crosjobs | H A D | 16-Feb-2021 | 328 | 14 | 4 |
| detect_host_arch.py | H A D | 16-Feb-2021 | 1.7 KiB | 56 | 35 |
| dirmd | H A D | 16-Feb-2021 | 323 | 13 | 4 |
| dirmd.bat | H A D | 16-Feb-2021 | 250 | 8 | 6 |
| download_from_google_storage | H A D | 16-Feb-2021 | 300 | 9 | 2 |
| download_from_google_storage.bat | H A D | 16-Feb-2021 | 435 | 13 | 10 |
| download_from_google_storage.py | H A D | 16-Feb-2021 | 23.6 KiB | 635 | 510 |
| ensure_bootstrap | H A D | 16-Feb-2021 | 1.6 KiB | 54 | 21 |
| fetch | H A D | 16-Feb-2021 | 768 | 22 | 9 |
| fetch.bat | H A D | 16-Feb-2021 | 908 | 29 | 25 |
| fetch.py | H A D | 16-Feb-2021 | 10.1 KiB | 320 | 245 |
| fix_encoding.py | H A D | 16-Feb-2021 | 12.2 KiB | 386 | 256 |
| gclient | H A D | 16-Feb-2021 | 1.1 KiB | 39 | 23 |
| gclient-new-workdir.py | H A D | 16-Feb-2021 | 4.1 KiB | 125 | 91 |
| gclient.bat | H A D | 16-Feb-2021 | 1,016 | 33 | 28 |
| gclient.py | H A D | 16-Feb-2021 | 116.9 KiB | 3,198 | 2,461 |
| gclient_completion.sh | H A D | 16-Feb-2021 | 2.3 KiB | 77 | 37 |
| gclient_eval.py | H A D | 16-Feb-2021 | 31.6 KiB | 892 | 645 |
| gclient_paths.py | H A D | 16-Feb-2021 | 5 KiB | 153 | 102 |
| gclient_scm.py | H A D | 16-Feb-2021 | 62.8 KiB | 1,626 | 1,234 |
| gclient_utils.py | H A D | 16-Feb-2021 | 40.5 KiB | 1,302 | 989 |
| gerrit_client.py | H A D | 16-Feb-2021 | 5.6 KiB | 178 | 135 |
| gerrit_util.py | H A D | 16-Feb-2021 | 34.1 KiB | 1,014 | 766 |
| git-cache | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-cl | H A D | 16-Feb-2021 | 219 | 7 | 1 |
| git-crrev-parse | H A D | 16-Feb-2021 | 1.7 KiB | 54 | 24 |
| git-drover | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-find-releases | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-footers | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-freeze | H A D | 16-Feb-2021 | 256 | 9 | 3 |
| git-gs | H A D | 16-Feb-2021 | 529 | 10 | 5 |
| git-hyper-blame | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-map | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-map-branches | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-mark-merge-base | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-migrate-default-branch | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-nav-downstream | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-nav-upstream | H A D | 16-Feb-2021 | 236 | 7 | 1 |
| git-new-branch | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-number | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-rebase-update | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-rename-branch | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-reparent-branch | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-retry | H A D | 16-Feb-2021 | 253 | 9 | 3 |
| git-runhooks | H A D | 16-Feb-2021 | 610 | 24 | 20 |
| git-squash-branch | H A D | 16-Feb-2021 | 215 | 7 | 1 |
| git-thaw | H A D | 16-Feb-2021 | 504 | 14 | 3 |
| git-upstream-diff | H A D | 16-Feb-2021 | 306 | 10 | 1 |
| git_cache.py | H A D | 16-Feb-2021 | 28.3 KiB | 790 | 601 |
| git_cl.py | H A D | 16-Feb-2021 | 191.7 KiB | 5,250 | 4,121 |
| git_cl_completion.sh | H A D | 16-Feb-2021 | 1.3 KiB | 49 | 24 |
| git_common.py | H A D | 16-Feb-2021 | 30.8 KiB | 1,110 | 791 |
| git_dates.py | H A D | 16-Feb-2021 | 1.8 KiB | 63 | 41 |
| git_drover.py | H A D | 16-Feb-2021 | 15.4 KiB | 470 | 373 |
| git_find_releases.py | H A D | 16-Feb-2021 | 1.9 KiB | 68 | 47 |
| git_footers.py | H A D | 16-Feb-2021 | 8.4 KiB | 262 | 197 |
| git_freezer.py | H A D | 16-Feb-2021 | 871 | 41 | 25 |
| git_hyper_blame.py | H A D | 16-Feb-2021 | 12.2 KiB | 392 | 256 |
| git_map.py | H A D | 16-Feb-2021 | 4.6 KiB | 167 | 126 |
| git_map_branches.py | H A D | 16-Feb-2021 | 11.1 KiB | 356 | 272 |
| git_mark_merge_base.py | H A D | 16-Feb-2021 | 2 KiB | 74 | 53 |
| git_migrate_default_branch.py | H A D | 16-Feb-2021 | 2.9 KiB | 94 | 67 |
| git_nav_downstream.py | H A D | 16-Feb-2021 | 1.9 KiB | 70 | 56 |
| git_new_branch.py | H A D | 16-Feb-2021 | 3 KiB | 83 | 66 |
| git_number.py | H A D | 16-Feb-2021 | 9.4 KiB | 302 | 213 |
| git_rebase_update.py | H A D | 16-Feb-2021 | 12.1 KiB | 352 | 254 |
| git_rename_branch.py | H A D | 16-Feb-2021 | 1.6 KiB | 56 | 36 |
| git_reparent_branch.py | H A D | 16-Feb-2021 | 3.2 KiB | 102 | 74 |
| git_retry.py | H A D | 16-Feb-2021 | 5.7 KiB | 182 | 134 |
| git_squash_branch.py | H A D | 16-Feb-2021 | 748 | 29 | 19 |
| git_upstream_diff.py | H A D | 16-Feb-2021 | 2 KiB | 65 | 43 |
| gn | H A D | 16-Feb-2021 | 270 | 9 | 2 |
| gn.bat | H A D | 16-Feb-2021 | 405 | 13 | 10 |
| gn.py | H A D | 16-Feb-2021 | 2.9 KiB | 79 | 45 |
| goma_auth | H A D | 16-Feb-2021 | 363 | 13 | 4 |
| goma_auth.bat | H A D | 16-Feb-2021 | 277 | 9 | 7 |
| goma_ctl | H A D | 16-Feb-2021 | 363 | 13 | 4 |
| goma_ctl.bat | H A D | 16-Feb-2021 | 277 | 9 | 7 |
| gsutil.py | H A D | 16-Feb-2021 | 5.5 KiB | 191 | 135 |
| gsutil.py.bat | H A D | 16-Feb-2021 | 731 | 24 | 19 |
| gsutil.vpython | H A D | 16-Feb-2021 | 2.4 KiB | 121 | 100 |
| led | H A D | 16-Feb-2021 | 321 | 13 | 4 |
| led.bat | H A D | 16-Feb-2021 | 255 | 8 | 6 |
| lockfile.py | H A D | 16-Feb-2021 | 2.9 KiB | 117 | 86 |
| luci-auth | H A D | 16-Feb-2021 | 328 | 14 | 4 |
| luci-auth.bat | H A D | 16-Feb-2021 | 255 | 9 | 6 |
| lucicfg | H A D | 16-Feb-2021 | 325 | 13 | 4 |
| lucicfg.bat | H A D | 16-Feb-2021 | 259 | 8 | 6 |
| mac_toolchain | H A D | 16-Feb-2021 | 331 | 13 | 4 |
| metrics.README.md | H A D | 16-Feb-2021 | 4.4 KiB | 102 | 80 |
| metrics.py | H A D | 16-Feb-2021 | 9.2 KiB | 298 | 214 |
| metrics_utils.py | H A D | 16-Feb-2021 | 8.6 KiB | 294 | 233 |
| my_activity.py | H A D | 16-Feb-2021 | 32.9 KiB | 975 | 819 |
| ninja | H A D | 16-Feb-2021 | 1.2 KiB | 45 | 33 |
| ninjalog.README.md | H A D | 16-Feb-2021 | 1.9 KiB | 65 | 46 |
| ninjalog_uploader.py | H A D | 16-Feb-2021 | 6.5 KiB | 234 | 160 |
| ninjalog_uploader_wrapper.py | H A D | 16-Feb-2021 | 3.2 KiB | 126 | 86 |
| owners.py | H A D | 16-Feb-2021 | 23.1 KiB | 646 | 470 |
| owners_client.py | H A D | 16-Feb-2021 | 1.5 KiB | 47 | 31 |
| owners_finder.py | H A D | 16-Feb-2021 | 12.5 KiB | 386 | 309 |
| post_build_ninja_summary.py | H A D | 16-Feb-2021 | 14.5 KiB | 350 | 237 |
| presubmit_canned_checks.py | H A D | 16-Feb-2021 | 63.5 KiB | 1,757 | 1,359 |
| presubmit_support.py | H A D | 16-Feb-2021 | 68.9 KiB | 1,994 | 1,517 |
| profile.xml | H A D | 16-Feb-2021 | 282 | 9 | 8 |
| prpc | H A D | 16-Feb-2021 | 323 | 14 | 4 |
| prpc.bat | H A D | 16-Feb-2021 | 250 | 9 | 6 |
| pylint | H A D | 16-Feb-2021 | 302 | 10 | 2 |
| pylint-1.5 | H A D | 16-Feb-2021 | 1.8 KiB | 79 | 3 |
| pylint-1.6 | H A D | 16-Feb-2021 | 1.8 KiB | 79 | 3 |
| pylint-1.7 | H A D | 16-Feb-2021 | 1.8 KiB | 79 | 3 |
| pylint-1.8 | H A D | 16-Feb-2021 | 1.8 KiB | 79 | 3 |
| pylint-1.9 | H A D | 16-Feb-2021 | 1.8 KiB | 79 | 3 |
| pylint-2.6 | H A D | 16-Feb-2021 | 1.5 KiB | 67 | 3 |
| pylint.bat | H A D | 16-Feb-2021 | 411 | 13 | 10 |
| pylint_main.py | H A D | 16-Feb-2021 | 1.2 KiB | 46 | 21 |
| pylintrc | H A D | 16-Feb-2021 | 9.1 KiB | 350 | 268 |
| python_runner.sh | H A D | 16-Feb-2021 | 2.1 KiB | 61 | 22 |
| rdb | H A D | 16-Feb-2021 | 321 | 13 | 4 |
| rdb.bat | H A D | 16-Feb-2021 | 248 | 8 | 6 |
| rdb_wrapper.py | H A D | 16-Feb-2021 | 1.9 KiB | 68 | 56 |
| repo | H A D | 16-Feb-2021 | 38.2 KiB | 1,195 | 910 |
| roll-dep | H A D | 16-Feb-2021 | 783 | 22 | 9 |
| roll-dep.bat | H A D | 16-Feb-2021 | 700 | 22 | 19 |
| roll_dep.py | H A D | 16-Feb-2021 | 10.8 KiB | 304 | 225 |
| scm.py | H A D | 16-Feb-2021 | 14 KiB | 420 | 322 |
| setup_color.py | H A D | 16-Feb-2021 | 4.6 KiB | 132 | 75 |
| split_cl.py | H A D | 16-Feb-2021 | 9.2 KiB | 266 | 201 |
| subcommand.py | H A D | 16-Feb-2021 | 8.8 KiB | 262 | 186 |
| subprocess2.py | H A D | 16-Feb-2021 | 7.8 KiB | 259 | 176 |
| update_depot_tools | H A D | 16-Feb-2021 | 3.8 KiB | 139 | 102 |
| update_depot_tools.bat | H A D | 16-Feb-2021 | 2 KiB | 66 | 54 |
| update_depot_tools_toggle.py | H A D | 16-Feb-2021 | 1.1 KiB | 39 | 25 |
| upload_metrics.py | H A D | 16-Feb-2021 | 604 | 27 | 14 |
| upload_to_google_storage.py | H A D | 16-Feb-2021 | 10.5 KiB | 307 | 240 |
| vpython | H A D | 16-Feb-2021 | 1,000 | 43 | 32 |
| vpython.bat | H A D | 16-Feb-2021 | 299 | 8 | 6 |
| vpython3 | H A D | 16-Feb-2021 | 1.5 KiB | 56 | 43 |
| vpython3.bat | H A D | 16-Feb-2021 | 603 | 13 | 10 |
| watchlists.py | H A D | 16-Feb-2021 | 4.3 KiB | 142 | 108 |
| weekly | H A D | 16-Feb-2021 | 1.6 KiB | 55 | 34 |
| win32imports.py | H A D | 16-Feb-2021 | 2.2 KiB | 62 | 44 |
| wtf | H A D | 16-Feb-2021 | 2.1 KiB | 82 | 52 |
| yapf | H A D | 16-Feb-2021 | 366 | 22 | 5 |
| yapf.bat | H A D | 16-Feb-2021 | 409 | 13 | 10 |
README.gclient.md
1# gclient
2
3gclient is a tool for managing a modular checkout of source code from multiple
4source code repositories. It wraps underlying source code management commands
5to provide support for distributing tree updates, status commands, and diffs
6across multiple checked-out working directories.
7
8The gclient script is controlled by a `.gclient` file at the top of a directory
9tree which will contain source code from multiple locations. A `.gclient` file
10is a Python script that defines a list of `solutions` with the following format:
11
12 solutions = [
13 { "name" : "src",
14 "url" : "https://chromium.googlesource.com/chromium/src.git",
15 "custom_deps" : {
16 # To use the trunk of a component instead of what's in DEPS:
17 #"component": "https://github.com/luci/luci-go",
18 # To exclude a component from your working copy:
19 #"data/really_large_component": None,
20 }
21 },
22 ]
23
24A `solution` is a collection of component pieces of software that will be
25checked out in a specific directory layout for building together.
26
27Each entry in the `solutions` list is defined by a Python dictionary that
28contains the following items:
29
30- `name`: The name of the directory in which the solution will be checked out.
31- `url`: The URL from which this solution will be checked out. gclient expects
32 that the checked-out solution will contain a file named `DEPS` that in turn
33 defines the specific pieces that must be checked out to create the working
34 directory layout for building and developing the solution's software.
35- `deps_file`: A string containing just the filename (not a path) of the file in
36 the solution dir to use as the list of dependencies. This tag is optional, and
37 defaults to `DEPS`.
38- `custom_deps`: A dictionary containing optional custom overrides for entries
39 in the solution's `DEPS` file. This can be used to have the local working
40 directory *not* check out and update specific components, or to sync the local
41 working-directory copy of a given component to a different specific revision,
42 or a branch, or the head of a tree. It can also be used to append new entries
43 that do not exist in the `DEPS` file.
44
45Within each checked-out solution, gclient expects to find a file typically named
46`DEPS` (it actually uses the value of the `deps_file` key above) which defines
47the different component pieces of software that must be checked out for the
48solution. The `DEPS` file is a Python script that defines a dictionary named
49`deps`:
50
51 deps = {
52 "src/outside": "https://outside-server/one/repo.git@12345677890123456778901234567789012345677890",
53 "src/component": "https://dont-use-github.com/its/unreliable.git@0000000000000000000000000000000000000000",
54 "src/relative": "/another/repo.git@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
55 }
56
57Each item in the `deps` dictionary consists of a key-value pair. The key is the
58directory into which the component will be checked out, relative to the
59directory containing the `.gclient` file. The value is the URL from which that
60directory will be checked out. If there is no address scheme (that is, no
61`http:` prefix), then the value must begin with a slash and is treated
62relative to the root of the solution's repository.
63
64The URL typically contains a specific revision or change number (as appropriate
65for the underlying SCM system) to `freeze` the external software at a specific,
66known state. Alternatively, if there is no revision or change number, the URL
67will track the latest changes on the specific trunk or branch.
68
README.git-cl.md
1# git-cl
2
3The git-cl README describes the git-cl command set. This document describes how
4code review and git work together in general, intended for people familiar with
5git but unfamiliar with the code review process supported by Rietveld and
6Gerrit.
7
8
9## Basic interaction with git
10
11The fundamental problem you encounter when you try to mix git and code review is
12that with git it's nice to commit code locally, while during a code review
13you're often requested to change something about your code. There are a few
14different ways you can handle this workflow with git:
15
161. Rewriting a single commit. Say the origin commit is O, and you commit your
17 initial work in a commit A, making your history like O--A. After review
18 comments, you `git commit --amend`, effectively erasing A and making a new
19 commit A', so history is now O--A'. (Equivalently, you can use
20 `git reset --soft` or `git rebase -i`.)
212. Writing follow-up commits. Initial work is again in A, and after review
22 comments, you write a new commit B so your history looks like O--A--B. When
23 you upload the revised patch, you upload the diff of O..B, not A..B; you
24 always upload the full diff of what you're proposing to change.
25
26The Rietveld patch uploader just takes arguments to `git diff`, so either of the
27above workflows work fine. If all you want to do is upload a patch, you can use
28the upload.py provided by Rietveld with arguments like this:
29
30 upload.py --server server.com <args to "git diff">
31
32The first time you upload, it creates a new issue; for follow-ups on the same
33issue, you need to provide the issue number:
34
35 upload.py --server server.com --issue 1234 <args to "git diff">
36
37
38## git-cl to the rescue
39
40git-cl simplifies the above in the following ways:
41
421. `git cl config` puts a persistent --server setting in your .git/config.
432. The first time you upload an issue, the issue number is associated with the
44 current *branch*. If you upload again, it will upload on the same issue.
45 (Note that this association is tied to a branch, not a commit, which means
46 you need a separate branch per review.)
473. If your branch is _tracking_ (in the `git checkout --track` sense) another
48 one (like origin/master), calls to `git cl upload` will diff against that
49 branch by default. (You can still pass arguments to `git diff` on the
50 command line, if necessary.)
51
52In the common case, this means that calling simply `git cl upload` will always
53upload the correct diff to the correct place.
54
55
56## Patch series
57
58The above is all you need to know for working on a single patch.
59
60Things get much more complicated when you have a series of commits that you want
61to get reviewed. Say your history looks like O--A--B--C. If you want to upload
62that as a single review, everything works just as above.
63
64But what if you upload each of A, B, and C as separate reviews? What if you
65then need to change A?
66
671. One option is rewriting history: write a new commit A', then use
68 `git rebase -i` to insert that diff in as O--A--A'--B--C as well as squash
69 it. This is sometimes not possible if B and C have touched some lines
70 affected by A'.
712. Another option, and the one espoused by software like topgit, is for you to
72 have separate branches for A, B, and C, and after writing A' you merge it
73 into each of those branches. (topgit automates this merging process.) This
74 is also what is recommended by git-cl, which likes having different branch
75 identifiers to hang the issue number off of. Your history ends up looking
76 like:
77
78 O---A---B---C
79 \ \ \
80 A'--B'--C'
81
82 Which is ugly, but it accurately tracks the real history of your work, can be
83 thrown away at the end by committing A+A' as a single `squash` commit.
84
85In practice, this comes up pretty rarely. Suggestions for better workflows are
86welcome.
87
88## Bash auto completion
89
901. Ensure that your base git commands are autocompleted
91[doc](https://git-scm.com/book/en/v1/Git-Basics-Tips-and-Tricks).
922. Add this to your .bashrc:
93
94 # The next line enables bash completion for git cl.
95 if [ -f "$HOME/bin/depot_tools/git_cl_completion.sh" ]; then
96 . "$HOME/bin/depot_tools/git_cl_completion.sh"
97 fi
98
993. Profit.
100
README.md
1# depot_tools
2
3Tools for working with Chromium development. It requires python 2.7 or 3.8 for python 3 support.
4
5
6## Tools
7
8The most important tools are:
9
10- `fetch`: A `gclient` wrapper to checkout a project. Use `fetch --help` for
11 more details.
12- `gclient`: A meta-checkout tool. Think
13 [repo](https://source.android.com/source/using-repo.html) or [git
14 submodules](https://git-scm.com/docs/git-submodule), except that it support
15 OS-specific rules, e.g. do not checkout Windows only dependencies when
16 checking out for Android. Use `gclient help` for more details and
17 [README.gclient.md](README.gclient.md).
18- `git cl`: A code review tool to interact with Rietveld or Gerrit. Use `git cl
19 help` for more details and [README.git-cl.md](README.git-cl.md).
20- `roll-dep`: A gclient dependency management tool to submit a _dep roll_,
21 updating a dependency to a newer revision.
22
23There are a lot of git utilities included.
24
25
26## Updating
27
28`depot_tools` updates itself automatically when running `gclient` tool. To
29disable auto update, set the environment variable `DEPOT_TOOLS_UPDATE=0`.
30
31To update package manually, run `update_depot_tools.bat` on Windows,
32or `./update_depot_tools` on Linux or Mac.
33
34On Windows only, running `gclient` will install `git` and `python`.
35
36
37## Contributing
38
39To contribute change for review:
40
41 git new-branch <somename>
42 # Hack
43 git add .
44 git commit -a -m "Fixes goat teleporting"
45 # find reviewers
46 git cl owners
47 git log -- <yourfiles>
48
49 # Request a review.
50 git cl upload -r reviewer1@chromium.org,reviewer2@chromium.org --send-mail
51
52 # Edit change description if needed.
53 git cl desc
54
55 # If change is approved, flag it to be committed.
56 git cl set-commit
57
58 # If change needs more work.
59 git rebase-update
60 ...
61 git cl upload -t "Fixes goat teleporter destination to be Australia"
62
63See also [open bugs](https://bugs.chromium.org/p/chromium/issues/list?can=2&q=component%3AInfra%3ESDK),
64[open reviews](https://chromium-review.googlesource.com/q/status:open+project:chromium%252Ftools%252Fdepot_tools),
65[forum](https://groups.google.com/a/chromium.org/forum/#!forum/infra-dev) or
66[report problems](https://bugs.chromium.org/p/chromium/issues/entry?components=Infra%3ESDK).
67
68### cpplint.py
69
70Until 2018, our `cpplint.py` was a copy of the upstream version at
71https://github.com/google/styleguide/tree/gh-pages/cpplint. Unfortunately, that
72repository is not maintained any more.
73If you want to update `cpplint.py` in `depot_tools`, just upload a patch to do
74so. We will figure out a long-term strategy via issue https://crbug.com/916550.
75
76Note that the `cpplint.py` here is also used by the [Tricium
77analyzer](https://chromium.googlesource.com/infra/infra/+/HEAD/go/src/infra/tricium/functions/cpplint),
78so if the cpplint.py here changes, we should also update the copy used there.
79