summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py34
1 files changed, 20 insertions, 14 deletions
diff --git a/project.py b/project.py
index 5ed103b9..7da7b1d3 100644
--- a/project.py
+++ b/project.py
@@ -3371,67 +3371,72 @@ class ManifestProject(MetaProject):
3371 @property 3371 @property
3372 def reference(self): 3372 def reference(self):
3373 """The --reference for this manifest.""" 3373 """The --reference for this manifest."""
3374 self.config.GetString('repo.reference') 3374 return self.config.GetString('repo.reference')
3375 3375
3376 @property 3376 @property
3377 def dissociate(self): 3377 def dissociate(self):
3378 """Whether to dissociate.""" 3378 """Whether to dissociate."""
3379 self.config.GetBoolean('repo.dissociate') 3379 return self.config.GetBoolean('repo.dissociate')
3380 3380
3381 @property 3381 @property
3382 def archive(self): 3382 def archive(self):
3383 """Whether we use archive.""" 3383 """Whether we use archive."""
3384 self.config.GetBoolean('repo.archive') 3384 return self.config.GetBoolean('repo.archive')
3385 3385
3386 @property 3386 @property
3387 def mirror(self): 3387 def mirror(self):
3388 """Whether we use mirror.""" 3388 """Whether we use mirror."""
3389 self.config.GetBoolean('repo.mirror') 3389 return self.config.GetBoolean('repo.mirror')
3390 3390
3391 @property 3391 @property
3392 def use_worktree(self): 3392 def use_worktree(self):
3393 """Whether we use worktree.""" 3393 """Whether we use worktree."""
3394 self.config.GetBoolean('repo.worktree') 3394 return self.config.GetBoolean('repo.worktree')
3395 3395
3396 @property 3396 @property
3397 def clone_bundle(self): 3397 def clone_bundle(self):
3398 """Whether we use clone_bundle.""" 3398 """Whether we use clone_bundle."""
3399 self.config.GetBoolean('repo.clonebundle') 3399 return self.config.GetBoolean('repo.clonebundle')
3400 3400
3401 @property 3401 @property
3402 def submodules(self): 3402 def submodules(self):
3403 """Whether we use submodules.""" 3403 """Whether we use submodules."""
3404 self.config.GetBoolean('repo.submodules') 3404 return self.config.GetBoolean('repo.submodules')
3405 3405
3406 @property 3406 @property
3407 def git_lfs(self): 3407 def git_lfs(self):
3408 """Whether we use git_lfs.""" 3408 """Whether we use git_lfs."""
3409 self.config.GetBoolean('repo.git-lfs') 3409 return self.config.GetBoolean('repo.git-lfs')
3410 3410
3411 @property 3411 @property
3412 def use_superproject(self): 3412 def use_superproject(self):
3413 """Whether we use superproject.""" 3413 """Whether we use superproject."""
3414 self.config.GetBoolean('repo.superproject') 3414 return self.config.GetBoolean('repo.superproject')
3415 3415
3416 @property 3416 @property
3417 def partial_clone(self): 3417 def partial_clone(self):
3418 """Whether this is a partial clone.""" 3418 """Whether this is a partial clone."""
3419 self.config.GetBoolean('repo.partialclone') 3419 return self.config.GetBoolean('repo.partialclone')
3420 3420
3421 @property 3421 @property
3422 def depth(self): 3422 def depth(self):
3423 """Partial clone depth.""" 3423 """Partial clone depth."""
3424 self.config.GetString('repo.depth') 3424 return self.config.GetString('repo.depth')
3425 3425
3426 @property 3426 @property
3427 def clone_filter(self): 3427 def clone_filter(self):
3428 """The clone filter.""" 3428 """The clone filter."""
3429 self.config.GetString('repo.clonefilter') 3429 return self.config.GetString('repo.clonefilter')
3430 3430
3431 @property 3431 @property
3432 def partial_clone_exclude(self): 3432 def partial_clone_exclude(self):
3433 """Partial clone exclude string""" 3433 """Partial clone exclude string"""
3434 self.config.GetBoolean('repo.partialcloneexclude') 3434 return self.config.GetBoolean('repo.partialcloneexclude')
3435
3436 @property
3437 def manifest_platform(self):
3438 """The --platform argument from `repo init`."""
3439 return self.config.GetString('manifest.platform')
3435 3440
3436 @property 3441 @property
3437 def _platform_name(self): 3442 def _platform_name(self):
@@ -3479,7 +3484,7 @@ class ManifestProject(MetaProject):
3479 platform: a string, restrict the checkout to projects with the specified 3484 platform: a string, restrict the checkout to projects with the specified
3480 platform group. 3485 platform group.
3481 git_event_log: an EventLog, for git tracing. 3486 git_event_log: an EventLog, for git tracing.
3482 tags: a boolean, whether to fetch tags., 3487 tags: a boolean, whether to fetch tags.
3483 manifest_name: a string, the name of the manifest file to use. 3488 manifest_name: a string, the name of the manifest file to use.
3484 this_manifest_only: a boolean, whether to only operate on the current sub 3489 this_manifest_only: a boolean, whether to only operate on the current sub
3485 manifest. 3490 manifest.
@@ -3620,6 +3625,7 @@ class ManifestProject(MetaProject):
3620 elif platform != 'none': 3625 elif platform != 'none':
3621 print('fatal: invalid platform flag', file=sys.stderr) 3626 print('fatal: invalid platform flag', file=sys.stderr)
3622 return False 3627 return False
3628 self.config.SetString('manifest.platform', platform)
3623 3629
3624 groups = [x for x in groups if x] 3630 groups = [x for x in groups if x]
3625 groupstr = ','.join(groups) 3631 groupstr = ','.join(groups)