• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Feb-2021-

bootstrap/H03-May-2022-727559

external_bin/gsutil/gsutil_4.28/gsutil/H16-Feb-2021-403,941307,155

fetch_configs/H16-Feb-2021-1,174735

git-templates/H16-Feb-2021-6631

infra/H16-Feb-2021-3933

man/H16-Feb-2021-4,8934,046

python-bin/H16-Feb-2021-84

python2-bin/H16-Feb-2021-84

recipes/H03-May-2022-26,36123,881

testing_support/H16-Feb-2021-2,1691,711

tests/H03-May-2022-23,12119,133

third_party/H16-Feb-2021-13,81010,396

win_toolchain/H16-Feb-2021-1,218962

zsh-goodies/H16-Feb-2021-2218

.cipd_impl.ps1H A D16-Feb-20215.3 KiB197142

.gitattributesH A D16-Feb-20211.5 KiB5646

.gitignoreH A D16-Feb-20211.7 KiB9379

.style.yapfH A D16-Feb-202165 54

.vpythonH A D16-Feb-20211.3 KiB6358

.vpython3H A D16-Feb-2021562 3127

CROS_OWNERSH A D16-Feb-2021196 87

GOMA_OWNERSH A D16-Feb-2021173 109

LICENSEH A D16-Feb-20211.5 KiB2827

LUCI_OWNERSH A D16-Feb-2021121 76

OWNERSH A D16-Feb-20211 KiB4131

PRESUBMIT.pyH A D16-Feb-20215.1 KiB151115

README.gclient.mdH A D16-Feb-20213.5 KiB6857

README.git-cl.mdH A D16-Feb-20214.1 KiB10072

README.mdH A D16-Feb-20212.8 KiB7955

WATCHLISTSH A D16-Feb-2021534 2721

auth.pyH A D16-Feb-20215 KiB164111

autoninjaH A D16-Feb-20211.1 KiB3718

autoninja.batH A D16-Feb-20211.7 KiB4534

autoninja.pyH A D16-Feb-20216.6 KiB17087

bbH A D16-Feb-2021320 134

bb.batH A D16-Feb-2021247 86

bootstrap_python3H A D16-Feb-2021982 3625

breakpad.pyH A D16-Feb-2021485 137

cbuildbotH A D16-Feb-20212.6 KiB8857

chrome_set_verH A D16-Feb-20212.6 KiB8857

cipdH A D16-Feb-20216.6 KiB248184

cipd.batH A D16-Feb-20211.8 KiB6854

cipd_bin_setup.batH A D16-Feb-2021288 75

cipd_bin_setup.shH A D16-Feb-2021611 2316

cipd_client_versionH A D16-Feb-202154 21

cipd_client_version.digestsH A D16-Feb-20211.5 KiB2321

cipd_manifest.versionsH A D16-Feb-202114.4 KiB439329

citH A D16-Feb-2021275 92

cit.batH A D16-Feb-2021410 1310

cit.pyH A D16-Feb-20215 KiB168124

clang-formatH A D16-Feb-2021280 92

clang-format.batH A D16-Feb-2021415 1310

clang_format.pyH A D16-Feb-20212.6 KiB8055

clang_format_merge_driverH A D16-Feb-2021293 92

clang_format_merge_driver.batH A D16-Feb-2021428 1310

clang_format_merge_driver.pyH A D16-Feb-20212.4 KiB7043

codereview.settingsH A D16-Feb-2021265 76

compile_single_fileH A D16-Feb-2021298 92

compile_single_file.batH A D16-Feb-2021394 129

compile_single_file.pyH A D16-Feb-20212.5 KiB7745

cpplint.batH A D16-Feb-2021390 129

cpplint.pyH A D16-Feb-2021229.8 KiB6,0983,975

cpplint_chromium.pyH A D16-Feb-20212.3 KiB5117

crosH A D16-Feb-20212.6 KiB8857

cros_sdkH A D16-Feb-20212.6 KiB8857

crosjobsH A D16-Feb-2021328 144

detect_host_arch.pyH A D16-Feb-20211.7 KiB5635

dirmdH A D16-Feb-2021323 134

dirmd.batH A D16-Feb-2021250 86

download_from_google_storageH A D16-Feb-2021300 92

download_from_google_storage.batH A D16-Feb-2021435 1310

download_from_google_storage.pyH A D16-Feb-202123.6 KiB635510

ensure_bootstrapH A D16-Feb-20211.6 KiB5421

fetchH A D16-Feb-2021768 229

fetch.batH A D16-Feb-2021908 2925

fetch.pyH A D16-Feb-202110.1 KiB320245

fix_encoding.pyH A D16-Feb-202112.2 KiB386256

gclientH A D16-Feb-20211.1 KiB3923

gclient-new-workdir.pyH A D16-Feb-20214.1 KiB12591

gclient.batH A D16-Feb-20211,016 3328

gclient.pyH A D16-Feb-2021116.9 KiB3,1982,461

gclient_completion.shH A D16-Feb-20212.3 KiB7737

gclient_eval.pyH A D16-Feb-202131.6 KiB892645

gclient_paths.pyH A D16-Feb-20215 KiB153102

gclient_scm.pyH A D16-Feb-202162.8 KiB1,6261,234

gclient_utils.pyH A D16-Feb-202140.5 KiB1,302989

gerrit_client.pyH A D16-Feb-20215.6 KiB178135

gerrit_util.pyH A D16-Feb-202134.1 KiB1,014766

git-cacheH A D16-Feb-2021215 71

git-clH A D16-Feb-2021219 71

git-crrev-parseH A D16-Feb-20211.7 KiB5424

git-droverH A D16-Feb-2021215 71

git-find-releasesH A D16-Feb-2021215 71

git-footersH A D16-Feb-2021215 71

git-freezeH A D16-Feb-2021256 93

git-gsH A D16-Feb-2021529 105

git-hyper-blameH A D16-Feb-2021215 71

git-mapH A D16-Feb-2021215 71

git-map-branchesH A D16-Feb-2021215 71

git-mark-merge-baseH A D16-Feb-2021215 71

git-migrate-default-branchH A D16-Feb-2021215 71

git-nav-downstreamH A D16-Feb-2021215 71

git-nav-upstreamH A D16-Feb-2021236 71

git-new-branchH A D16-Feb-2021215 71

git-numberH A D16-Feb-2021215 71

git-rebase-updateH A D16-Feb-2021215 71

git-rename-branchH A D16-Feb-2021215 71

git-reparent-branchH A D16-Feb-2021215 71

git-retryH A D16-Feb-2021253 93

git-runhooksH A D16-Feb-2021610 2420

git-squash-branchH A D16-Feb-2021215 71

git-thawH A D16-Feb-2021504 143

git-upstream-diffH A D16-Feb-2021306 101

git_cache.pyH A D16-Feb-202128.3 KiB790601

git_cl.pyH A D16-Feb-2021191.7 KiB5,2504,121

git_cl_completion.shH A D16-Feb-20211.3 KiB4924

git_common.pyH A D16-Feb-202130.8 KiB1,110791

git_dates.pyH A D16-Feb-20211.8 KiB6341

git_drover.pyH A D16-Feb-202115.4 KiB470373

git_find_releases.pyH A D16-Feb-20211.9 KiB6847

git_footers.pyH A D16-Feb-20218.4 KiB262197

git_freezer.pyH A D16-Feb-2021871 4125

git_hyper_blame.pyH A D16-Feb-202112.2 KiB392256

git_map.pyH A D16-Feb-20214.6 KiB167126

git_map_branches.pyH A D16-Feb-202111.1 KiB356272

git_mark_merge_base.pyH A D16-Feb-20212 KiB7453

git_migrate_default_branch.pyH A D16-Feb-20212.9 KiB9467

git_nav_downstream.pyH A D16-Feb-20211.9 KiB7056

git_new_branch.pyH A D16-Feb-20213 KiB8366

git_number.pyH A D16-Feb-20219.4 KiB302213

git_rebase_update.pyH A D16-Feb-202112.1 KiB352254

git_rename_branch.pyH A D16-Feb-20211.6 KiB5636

git_reparent_branch.pyH A D16-Feb-20213.2 KiB10274

git_retry.pyH A D16-Feb-20215.7 KiB182134

git_squash_branch.pyH A D16-Feb-2021748 2919

git_upstream_diff.pyH A D16-Feb-20212 KiB6543

gnH A D16-Feb-2021270 92

gn.batH A D16-Feb-2021405 1310

gn.pyH A D16-Feb-20212.9 KiB7945

goma_authH A D16-Feb-2021363 134

goma_auth.batH A D16-Feb-2021277 97

goma_ctlH A D16-Feb-2021363 134

goma_ctl.batH A D16-Feb-2021277 97

gsutil.pyH A D16-Feb-20215.5 KiB191135

gsutil.py.batH A D16-Feb-2021731 2419

gsutil.vpythonH A D16-Feb-20212.4 KiB121100

ledH A D16-Feb-2021321 134

led.batH A D16-Feb-2021255 86

lockfile.pyH A D16-Feb-20212.9 KiB11786

luci-authH A D16-Feb-2021328 144

luci-auth.batH A D16-Feb-2021255 96

lucicfgH A D16-Feb-2021325 134

lucicfg.batH A D16-Feb-2021259 86

mac_toolchainH A D16-Feb-2021331 134

metrics.README.mdH A D16-Feb-20214.4 KiB10280

metrics.pyH A D16-Feb-20219.2 KiB298214

metrics_utils.pyH A D16-Feb-20218.6 KiB294233

my_activity.pyH A D16-Feb-202132.9 KiB975819

ninjaH A D16-Feb-20211.2 KiB4533

ninjalog.README.mdH A D16-Feb-20211.9 KiB6546

ninjalog_uploader.pyH A D16-Feb-20216.5 KiB234160

ninjalog_uploader_wrapper.pyH A D16-Feb-20213.2 KiB12686

owners.pyH A D16-Feb-202123.1 KiB646470

owners_client.pyH A D16-Feb-20211.5 KiB4731

owners_finder.pyH A D16-Feb-202112.5 KiB386309

post_build_ninja_summary.pyH A D16-Feb-202114.5 KiB350237

presubmit_canned_checks.pyH A D16-Feb-202163.5 KiB1,7571,359

presubmit_support.pyH A D16-Feb-202168.9 KiB1,9941,517

profile.xmlH A D16-Feb-2021282 98

prpcH A D16-Feb-2021323 144

prpc.batH A D16-Feb-2021250 96

pylintH A D16-Feb-2021302 102

pylint-1.5H A D16-Feb-20211.8 KiB793

pylint-1.6H A D16-Feb-20211.8 KiB793

pylint-1.7H A D16-Feb-20211.8 KiB793

pylint-1.8H A D16-Feb-20211.8 KiB793

pylint-1.9H A D16-Feb-20211.8 KiB793

pylint-2.6H A D16-Feb-20211.5 KiB673

pylint.batH A D16-Feb-2021411 1310

pylint_main.pyH A D16-Feb-20211.2 KiB4621

pylintrcH A D16-Feb-20219.1 KiB350268

python_runner.shH A D16-Feb-20212.1 KiB6122

rdbH A D16-Feb-2021321 134

rdb.batH A D16-Feb-2021248 86

rdb_wrapper.pyH A D16-Feb-20211.9 KiB6856

repoH A D16-Feb-202138.2 KiB1,195910

roll-depH A D16-Feb-2021783 229

roll-dep.batH A D16-Feb-2021700 2219

roll_dep.pyH A D16-Feb-202110.8 KiB304225

scm.pyH A D16-Feb-202114 KiB420322

setup_color.pyH A D16-Feb-20214.6 KiB13275

split_cl.pyH A D16-Feb-20219.2 KiB266201

subcommand.pyH A D16-Feb-20218.8 KiB262186

subprocess2.pyH A D16-Feb-20217.8 KiB259176

update_depot_toolsH A D16-Feb-20213.8 KiB139102

update_depot_tools.batH A D16-Feb-20212 KiB6654

update_depot_tools_toggle.pyH A D16-Feb-20211.1 KiB3925

upload_metrics.pyH A D16-Feb-2021604 2714

upload_to_google_storage.pyH A D16-Feb-202110.5 KiB307240

vpythonH A D16-Feb-20211,000 4332

vpython.batH A D16-Feb-2021299 86

vpython3H A D16-Feb-20211.5 KiB5643

vpython3.batH A D16-Feb-2021603 1310

watchlists.pyH A D16-Feb-20214.3 KiB142108

weeklyH A D16-Feb-20211.6 KiB5534

win32imports.pyH A D16-Feb-20212.2 KiB6244

wtfH A D16-Feb-20212.1 KiB8252

yapfH A D16-Feb-2021366 225

yapf.batH A D16-Feb-2021409 1310

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