diff options
author | Shawn O. Pearce <sop@google.com> | 2008-11-04 07:37:10 -0800 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2008-11-05 18:08:32 -0800 |
commit | e284ad1d1a2c6fa0e0ac800e87b2607f9bda339e (patch) | |
tree | fcf35ac784ec2e13c78ee3882ccb1fec0ad3d049 /git_config.py | |
parent | 3e5481999d5f853e19ee5caaaaa968fc4b5176ab (diff) | |
download | git-repo-e284ad1d1a2c6fa0e0ac800e87b2607f9bda339e.tar.gz |
Add 'repo init --mirror' to download a complete forrestv1.1
The mirror option downloads a complete forrest (as described by the
manifest) and creates a replica of the remote repositories rather
than a client working directory. This permits other clients to
sync off the mirror site.
A mirror can be positioned in a "DMZ", where the mirror executes
"repo sync" to obtain changes from the external upstream and
clients inside the protected zone operate off the mirror only,
and therefore do not require direct git:// access to the external
upstream repositories.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git_config.py b/git_config.py index 76031a0e..9d5162e7 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -285,12 +285,14 @@ class Remote(object): | |||
285 | return True | 285 | return True |
286 | return False | 286 | return False |
287 | 287 | ||
288 | def ResetFetch(self): | 288 | def ResetFetch(self, mirror=False): |
289 | """Set the fetch refspec to its default value. | 289 | """Set the fetch refspec to its default value. |
290 | """ | 290 | """ |
291 | self.fetch = [RefSpec(True, | 291 | if mirror: |
292 | 'refs/heads/*', | 292 | dst = 'refs/heads/*' |
293 | 'refs/remotes/%s/*' % self.name)] | 293 | else: |
294 | dst = 'refs/remotes/%s/*' % self.name | ||
295 | self.fetch = [RefSpec(True, 'refs/heads/*', dst)] | ||
294 | 296 | ||
295 | def Save(self): | 297 | def Save(self): |
296 | """Save this remote to the configuration. | 298 | """Save this remote to the configuration. |