diff options
Diffstat (limited to 'subcmds/init.py')
| -rw-r--r-- | subcmds/init.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index d1fb4316..4f994300 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -89,8 +89,9 @@ default.xml will be used. | |||
| 89 | 89 | ||
| 90 | def _SyncManifest(self, opt): | 90 | def _SyncManifest(self, opt): |
| 91 | m = self.manifest.manifestProject | 91 | m = self.manifest.manifestProject |
| 92 | is_new = not m.Exists | ||
| 92 | 93 | ||
| 93 | if not m.Exists: | 94 | if is_new: |
| 94 | if not opt.manifest_url: | 95 | if not opt.manifest_url: |
| 95 | print >>sys.stderr, 'fatal: manifest url (-u) is required.' | 96 | print >>sys.stderr, 'fatal: manifest url (-u) is required.' |
| 96 | sys.exit(1) | 97 | sys.exit(1) |
| @@ -117,7 +118,11 @@ default.xml will be used. | |||
| 117 | r.Save() | 118 | r.Save() |
| 118 | 119 | ||
| 119 | if opt.mirror: | 120 | if opt.mirror: |
| 120 | m.config.SetString('repo.mirror', 'true') | 121 | if is_new: |
| 122 | m.config.SetString('repo.mirror', 'true') | ||
| 123 | else: | ||
| 124 | print >>sys.stderr, 'fatal: --mirror not supported on existing client' | ||
| 125 | sys.exit(1) | ||
| 121 | 126 | ||
| 122 | m.Sync_NetworkHalf() | 127 | m.Sync_NetworkHalf() |
| 123 | m.Sync_LocalHalf() | 128 | m.Sync_LocalHalf() |
