diff options
-rw-r--r-- | subcmds/init.py | 9 | ||||
-rw-r--r-- | subcmds/sync.py | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index a3f3241a..1fbe4654 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -478,8 +478,13 @@ to update the working directory files. | |||
478 | 478 | ||
479 | # Check this here, else manifest will be tagged "not new" and init won't be | 479 | # Check this here, else manifest will be tagged "not new" and init won't be |
480 | # possible anymore without removing the .repo/manifests directory. | 480 | # possible anymore without removing the .repo/manifests directory. |
481 | if opt.archive and opt.mirror: | 481 | if opt.mirror: |
482 | self.OptionParser.error('--mirror and --archive cannot be used together.') | 482 | if opt.archive: |
483 | self.OptionParser.error('--mirror and --archive cannot be used ' | ||
484 | 'together.') | ||
485 | if opt.use_superproject is not None: | ||
486 | self.OptionParser.error('--mirror and --use-superproject cannot be ' | ||
487 | 'used together.') | ||
483 | 488 | ||
484 | if opt.standalone_manifest and ( | 489 | if opt.standalone_manifest and ( |
485 | opt.manifest_branch or opt.manifest_name != 'default.xml'): | 490 | opt.manifest_branch or opt.manifest_name != 'default.xml'): |
diff --git a/subcmds/sync.py b/subcmds/sync.py index 1d778e1e..ee7e4a80 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -986,6 +986,10 @@ later is required to fix a server side protocol bug. | |||
986 | 986 | ||
987 | load_local_manifests = not self.manifest.HasLocalManifests | 987 | load_local_manifests = not self.manifest.HasLocalManifests |
988 | use_superproject = git_superproject.UseSuperproject(opt, self.manifest) | 988 | use_superproject = git_superproject.UseSuperproject(opt, self.manifest) |
989 | if self.manifest.IsMirror or self.manifest.IsArchive: | ||
990 | # Don't use superproject, because we have no working tree. | ||
991 | use_superproject = False | ||
992 | print('Defaulting to no-use-superproject because there is no working tree.') | ||
989 | superproject_logging_data = { | 993 | superproject_logging_data = { |
990 | 'superproject': use_superproject, | 994 | 'superproject': use_superproject, |
991 | 'haslocalmanifests': bool(self.manifest.HasLocalManifests), | 995 | 'haslocalmanifests': bool(self.manifest.HasLocalManifests), |