summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 8d89cf72..8defc932 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -278,16 +278,9 @@ later is required to fix a server side protocol bug.
278 branch = branch[len(R_HEADS):] 278 branch = branch[len(R_HEADS):]
279 return branch 279 return branch
280 280
281 def _UseSuperproject(self, opt):
282 """Returns True if use-superproject option is enabled"""
283 if opt.use_superproject is not None:
284 return opt.use_superproject
285 else:
286 return self.manifest.manifestProject.config.GetBoolean('repo.superproject')
287
288 def _GetCurrentBranchOnly(self, opt): 281 def _GetCurrentBranchOnly(self, opt):
289 """Returns True if current-branch or use-superproject options are enabled.""" 282 """Returns True if current-branch or use-superproject options are enabled."""
290 return opt.current_branch_only or self._UseSuperproject(opt) 283 return opt.current_branch_only or git_superproject.UseSuperproject(opt, self.manifest)
291 284
292 def _UpdateProjectsRevisionId(self, opt, args, load_local_manifests): 285 def _UpdateProjectsRevisionId(self, opt, args, load_local_manifests):
293 """Update revisionId of every project with the SHA from superproject. 286 """Update revisionId of every project with the SHA from superproject.
@@ -964,7 +957,7 @@ later is required to fix a server side protocol bug.
964 self._UpdateManifestProject(opt, mp, manifest_name) 957 self._UpdateManifestProject(opt, mp, manifest_name)
965 958
966 load_local_manifests = not self.manifest.HasLocalManifests 959 load_local_manifests = not self.manifest.HasLocalManifests
967 if self._UseSuperproject(opt): 960 if git_superproject.UseSuperproject(opt, self.manifest):
968 new_manifest_name = self._UpdateProjectsRevisionId(opt, args, load_local_manifests) 961 new_manifest_name = self._UpdateProjectsRevisionId(opt, args, load_local_manifests)
969 if not new_manifest_name: 962 if not new_manifest_name:
970 manifest_name = new_manifest_name 963 manifest_name = new_manifest_name