From 6ba6ba0ef3ae4de384d931a50ec25e675e3aab16 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 24 May 2012 09:46:50 -0700 Subject: [PATCH] Fix initial sync broken by sync-c option Change-Id: I308753da8944e6ce5c46e3bfee1bcd41d5b7e292 --- project.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/project.py b/project.py index 65fefd92..afab1b7c 100644 --- a/project.py +++ b/project.py @@ -966,7 +966,15 @@ 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 current_branch_only: + if self.sync_c: + current_branch_only = True + elif not self.manifest._loaded: + # Manifest cannot check defaults until it syncs. + current_branch_only = False + elif self.manifest.default.sync_c: + current_branch_only = True + if not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir, current_branch_only=current_branch_only): return False