From 5cf16607d33268ab0320a886c4a7b5e052684fa4 Mon Sep 17 00:00:00 2001 From: Jeff Davidson Date: Thu, 2 Oct 2014 10:13:38 -0700 Subject: [PATCH] Allow selection of a target when using smart sync. Change-Id: I02a24471b9b62dbba3773f22a289825bc566acd9 --- subcmds/sync.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 6f77310f..b1945d5e 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -558,7 +558,10 @@ later is required to fix a server side protocol bug. branch = branch[len(R_HEADS):] env = os.environ.copy() - if 'TARGET_PRODUCT' in env and 'TARGET_BUILD_VARIANT' in env: + if 'SYNC_TARGET' in env: + target = env['SYNC_TARGET'] + [success, manifest_str] = server.GetApprovedManifest(branch, target) + elif 'TARGET_PRODUCT' in env and 'TARGET_BUILD_VARIANT' in env: target = '%s-%s' % (env['TARGET_PRODUCT'], env['TARGET_BUILD_VARIANT']) [success, manifest_str] = server.GetApprovedManifest(branch, target)