IntroductionChromium uses a package of scripts, the depot_tools, to manage interaction with the Chromium source code repository and the Chromium development process. It contains the following utilities:
It is highly encouraged to look around and open the files in a text editor as this page can quickly become outdated. Please keep this page updated! Help!These tools don't have man pages but have integrated help! Try all of these commands! If the doc is not adequate, send patches to fix them.
gclientgclient is a python script to manage a workspace of modular dependencies that are each checked out independently from different subversion or git repositories. Features are:
.gclient fileIt's the master file. It is, in fact, a python script. It specifies the following variables:
Additional variables are ignored. Each project described in the solutions array can contain an optional DEPS file that will be processed. The .gclient file is generated with gclient config <url> or by hand. Each solutions entry is a dictionary that can contain the following variables:
.gclient examplehttp://dev.chromium.org/developers/contributing-to-webkit explains how to hack your own .gclient file to modify the checkout to fetch from webkit's trunk instead of the version specified by chromium. DEPS fileA DEPS file specifies dependencies of a project. It is in fact a python script. It specifies the following variables:
Additional variables are ignored. Special keywords are:
Pinned depsEach dependency checkout URL can (and usually does) contain a revision number or git hash, which means you're going to check out and build from that specific revision of the module in question. We call that pinned deps. The advantage is that you can build from a known working revision, even if it comes from a completely different SCM repository or going back in time. The drawback is you have to update the revision number(s) constantly, what we call deps rolls. DEPS examplesWebkit's WebKit/chromium/DEPS and Chromium's src/DEPS are fairly complex examples that will show all the possibilities of a DEPS file. Sending patchesSomething in depot_tools or git-cl-repo is broken? You want to add a YAT, a yet another tool? You do not need to be a committer! Yay! Send a patch to maruel@ or whoever shows up in svn log/git log to have it fixed. If you are a committer, first install git-svn. After that, here's how to make your depot_tools git-svn-aware:
Then use git-cl as usual to contribute code. Disabling auto updateThe gclient and git-cl scripts are actually wrapper scripts that will, by default, always update the depot_tools to the latest versions of the tools checked in at http://src.chromium.org/chrome/trunk/tools/depot_tools/. If for some reason you wish to disable this auto-update behavior, either:
CaveatChromium engineers expect the auto-updating behavior of depot_tools, checkout or presubmit breakage may ensue. |
