blob: b963795b568b56bc37408c45b288b54078fc95b4 [file] [log] [blame]
[email protected]e105d8d2009-04-30 17:58:251# Copyright 2008-2009, Google Inc.
2
3gclient is a tool for managing a modular checkout of source code
4from multiple source code repositories. It wraps underlying source
5code management commands to provide support for distributing tree
6updates, status commands, and diffs across multiple checked-out
7working directories.
8
9
10The gclient script is controlled by a ".gclient" file at the top
11of a directory tree which will contain source code from multiple
12locations. A ".gclient" file is a Python script that defines a list
13of "solutions" with the following format:
14
15 solutions = [
16 { "name" : "src",
17 "url" : "svn://svnserver/component/trunk/src",
18 "custom_deps" : {
19 # To use the trunk of a component instead of what's in DEPS:
20 #"component": "https://svnserver/component/trunk/",
21 # To exclude a component from your working copy:
22 #"data/really_large_component": None,
23 }
24 },
25 ]
26
27A "solution" is a collection of component pieces of software that will
28be checked out in a specific directory layout for building together.
29
30Each entry in the "solutions" list is defined by a Python dictionary
31that contains the following items:
32
33 name
34 The name of the directory in which the solution will be
35 checked out.
36
37 url
38 The URL from which this solution will be checked out.
39 gclient expects that the checked-out solution will contain a
40 file named "DEPS" that in turn defines the specific pieces
41 that must be checked out to create the working directory
42 layout for building and developing the solution's software.
43
44 custom_deps
45 A dictionary containing optional custom overrides for entries
46 in the solution's "DEPS" file. This can be used to have
47 the local working directory *not* check out and update specific
48 components, or to sync the local working-directory copy of a
49 given component to a different specific revision, or a branch,
50 or the head of a tree. It can also be used to append new entries
51 that do not exist in the "DEPS" file.
52
53Within each checked-out solution, gclient expects to find a file
54named "DEPS" which defines the different component pieces of
55software that must be checked out for the solution. The "DEPS"
56file is a Python script that defines a dictionary named "deps":
57
58 deps = {
59 "src/outside" : "http://outside-server/trunk@1234",
60 "src/component" : "svn://svnserver/component/trunk/src@77829",
61 "src/relative" : "/trunk/src@77829",
62 }
63
64Each item in the "deps" dictionary consists of a key-value pair.
65The key is the directory into which the component will be checked
66out, relative to the directory containing the ".gclient" file.
67The value is the URL from which that directory will be checked out.
68If there is no address scheme (that is, no "http:" or "svn:" prefix),
69then the value must begin with a slash and is treated relative to the
70root of the solution's repository.
71
72The URL typically contains a specific revision or change number (as
73appropriate for the underlying SCM system) to "freeze" the external
74software at a specific, known state. Alternatively, if there is no
75revision or change number, the URL will track the latest changes on the
76specific trunk or branch.