diff options
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 4023ab6d..17edfa05 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -41,6 +41,13 @@ The optional -m argument can be used to specify an alternate manifest | |||
41 | to be used. If no manifest is specified, the manifest default.xml | 41 | to be used. If no manifest is specified, the manifest default.xml |
42 | will be used. | 42 | will be used. |
43 | 43 | ||
44 | The --reference option can be used to point to a directory that | ||
45 | has the content of a --mirror sync. This will make the working | ||
46 | directory use as much data as possible from the local reference | ||
47 | directory when fetching from the server. This will make the sync | ||
48 | go a lot faster by reducing data traffic on the network. | ||
49 | |||
50 | |||
44 | Switching Manifest Branches | 51 | Switching Manifest Branches |
45 | --------------------------- | 52 | --------------------------- |
46 | 53 | ||
@@ -71,7 +78,9 @@ to update the working directory files. | |||
71 | g.add_option('--mirror', | 78 | g.add_option('--mirror', |
72 | dest='mirror', action='store_true', | 79 | dest='mirror', action='store_true', |
73 | help='mirror the forrest') | 80 | help='mirror the forrest') |
74 | 81 | g.add_option('--reference', | |
82 | dest='reference', | ||
83 | help='location of mirror directory', metavar='DIR') | ||
75 | 84 | ||
76 | # Tool | 85 | # Tool |
77 | g = p.add_option_group('repo Version options') | 86 | g = p.add_option_group('repo Version options') |
@@ -115,6 +124,9 @@ to update the working directory files. | |||
115 | r.ResetFetch() | 124 | r.ResetFetch() |
116 | r.Save() | 125 | r.Save() |
117 | 126 | ||
127 | if opt.reference: | ||
128 | m.config.SetString('repo.reference', opt.reference) | ||
129 | |||
118 | if opt.mirror: | 130 | if opt.mirror: |
119 | if is_new: | 131 | if is_new: |
120 | m.config.SetString('repo.mirror', 'true') | 132 | m.config.SetString('repo.mirror', 'true') |