From 79770d269e319dee578beed682669703d4c764ba Mon Sep 17 00:00:00 2001 From: Anatol Pomazau Date: Fri, 20 Apr 2012 14:41:59 -0700 Subject: Add sync-c option to manifest There are use-cases when fetching all branch is impractical and we really need to fetch only one branch/tag. e.g. there is a large project with binaries and every update of a binary file is put to a separate branch. The whole project history might be too large to allow users fetch it. Add 'sync-c' option to 'project' and 'default' tags to make it possible to configure 'sync-c' behavior at per-project and per-manifest level. Note that currently there is no possibility to revert boolean flag from command line. If 'sync-c' is set in manifest then you cannot make full fetch by providing a repo tool argument. Change-Id: Ie36fe5737304930493740370239403986590f593 --- project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'project.py') diff --git a/project.py b/project.py index 2b740007..40f6f317 100644 --- a/project.py +++ b/project.py @@ -510,7 +510,8 @@ class Project(object): revisionExpr, revisionId, rebase = True, - groups = None): + groups = None, + sync_c = False): self.manifest = manifest self.name = name self.remote = remote @@ -531,6 +532,7 @@ class Project(object): self.rebase = rebase self.groups = groups + self.sync_c = sync_c self.snapshots = {} self.copyfiles = [] @@ -964,6 +966,7 @@ class Project(object): and self._ApplyCloneBundle(initial=is_new, quiet=quiet): is_new = False + current_branch_only = current_branch_only or self.sync_c or self.manifest.default.sync_c if not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir, current_branch_only=current_branch_only): return False -- cgit v1.2.3-54-g00ecf