GBS incremental option is not working because of "--delete" option.
Change-Id: Ife793ff920f8921714d5f878ce3dab2c1997db31
Signed-off-by: donghyuk.yang <donghyuk.yang@samsung.com>
import org.tizen.nativeplatform.Activator;
import org.tizen.nativeplatform.build.IBuildCommandProvider.BUILDTOOL;
import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;
-import org.tizen.nativeplatform.remote.connection.RootstrapSynchronizer;
-import org.tizen.nativeplatform.remote.connection.WorkspaceDeltaManager;
-import org.tizen.nativeplatform.remote.connection.WorkspaceResourceDelta;
-import org.tizen.nativeplatform.remote.connection.WorkspaceSynchronizer;
+import org.tizen.nativeplatform.remote.synchronize.RootstrapSynchronizer;
+import org.tizen.nativeplatform.remote.synchronize.WorkspaceDeltaManager;
+import org.tizen.nativeplatform.remote.synchronize.WorkspaceResourceDelta;
+import org.tizen.nativeplatform.remote.synchronize.WorkspaceSynchronizer;
import org.tizen.nativeplatform.rootstrap.RootstrapManager;
import org.tizen.nativeplatform.util.IPackageUtil;
import org.tizen.nativeplatform.util.PkgUtilFactory;
import org.tizen.nativeplatform.pkg.model.IPackage;
import org.tizen.nativeplatform.pkg.model.PkgStatus;
import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;
-import org.tizen.nativeplatform.remote.connection.RootstrapSynchronizer;
+import org.tizen.nativeplatform.remote.synchronize.RootstrapSynchronizer;
import org.tizen.nativeplatform.rootstrap.RootstrapManager;
import org.tizen.nativeplatform.types.CmdTargetTypes;
import org.tizen.nativeplatform.util.IPackageUtil;
-package org.tizen.nativeplatform.remote.connection;\r
+package org.tizen.nativeplatform.remote.synchronize;\r
\r
import java.io.File;\r
import java.util.ArrayList;\r
import org.tizen.common.util.log.UserLogger;\r
import org.tizen.nativecommon.build.SmartBuildInterface;\r
import org.tizen.nativeplatform.build.PlatformConfigurationManager;\r
+import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;\r
import org.tizen.nativeplatform.util.PlatformUserInteraction;\r
import org.tizen.nativeplatform.util.RootstrapUtil;\r
import org.tizen.nativeplatform.views.model.PlatformRootstrap;\r
UserLogger.start(PlatformUserInteraction.CATE_SYNCRONIZE, PlatformUserInteraction.SYNC_INCLUDES);\r
if (syncIncludes) {\r
monitor.subTask(String.format("Synchronize includes... [%s]", rootstrap.getId()));\r
- processor.downloadSync(remoteIncludePath, usrDir.toString(), EXCLUDES, monitor);\r
+ processor.downloadSync(remoteIncludePath, usrDir.toString(), EXCLUDES, true, monitor);\r
}\r
monitor.worked(1);\r
if (syncDebugsrc) {\r
FileUtil.createDirectory(debugDir);\r
}\r
monitor.subTask(String.format("Synchronize debug source... [%s]", rootstrap.getId()));\r
- processor.downloadSync(remoteDebugsrcPath, debugDir.toString(), null, monitor);\r
+ processor.downloadSync(remoteDebugsrcPath, debugDir.toString(), null, true, monitor);\r
}\r
monitor.worked(1);\r
UserLogger.end(PlatformUserInteraction.CATE_SYNCRONIZE, PlatformUserInteraction.SYNC_INCLUDES);\r
-package org.tizen.nativeplatform.remote.connection;\r
+package org.tizen.nativeplatform.remote.synchronize;\r
\r
import java.util.HashMap;\r
import java.util.List;\r
this.sshPrivateKey = sshPrivateKey;\r
}\r
\r
- public boolean downloadSync(String remotePath, String localPath, String[] excludes, IProgressMonitor monitor) throws InterruptedException {\r
+ public boolean downloadSync(String remotePath, String localPath, String[] excludes, boolean delete, IProgressMonitor monitor) throws InterruptedException {\r
SmartBuildInterface sbi = SmartBuildInterface.getInstance();\r
String[] envs = sbi.getEnvironmentVariables();\r
Map<String, String> envMap = new HashMap<String, String>();\r
StringBuffer cmd = new StringBuffer();\r
cmd.append(new Path(msysBinPath).append("sh.exe").toOSString());\r
cmd.append(" -c \"");\r
- cmd.append("rsync -avz --delete -e");\r
+ cmd.append("rsync -avz ");\r
+ if (delete) {\r
+ cmd.append("--delete ");\r
+ }\r
+ cmd.append("-e ");\r
cmd.append("'ssh -i ");\r
cmd.append(sshPrivateKey);\r
cmd.append(" -o StrictHostKeyChecking=no");\r
return result;\r
}\r
\r
- public boolean uploadSync(String localPath, String remotePath, String[] excludes, IProgressMonitor monitor) \r
- throws InterruptedException {\r
+ public boolean uploadSync(String localPath, String remotePath, String[] excludes, boolean delete, \r
+ IProgressMonitor monitor) throws InterruptedException {\r
SmartBuildInterface sbi = SmartBuildInterface.getInstance();\r
String[] envs = sbi.getEnvironmentVariables();\r
Map<String, String> envMap = new HashMap<String, String>();\r
StringBuffer cmd = new StringBuffer();\r
cmd.append(new Path(msysBinPath).append("sh.exe").toOSString());\r
cmd.append(" -c \"");\r
- cmd.append("rsync -avz --delete -e ");\r
+ cmd.append("rsync -avz ");\r
+ if (delete) {\r
+ cmd.append("--delete ");\r
+ }\r
+ cmd.append("-e ");\r
cmd.append("'ssh -i ");\r
cmd.append(sshPrivateKey);\r
cmd.append(" -o StrictHostKeyChecking=no");\r
-package org.tizen.nativeplatform.remote.connection;\r
+package org.tizen.nativeplatform.remote.synchronize;\r
\r
import java.util.HashMap;\r
import java.util.Map;\r
-package org.tizen.nativeplatform.remote.connection;\r
+package org.tizen.nativeplatform.remote.synchronize;\r
\r
import org.eclipse.core.internal.events.ResourceDeltaFactory;\r
import org.eclipse.core.internal.resources.Workspace;\r
-package org.tizen.nativeplatform.remote.connection;\r
+package org.tizen.nativeplatform.remote.synchronize;\r
\r
import org.eclipse.core.resources.IProject;\r
import org.eclipse.core.runtime.IPath;\r
import org.eclipse.ptp.remotetools.exception.RemoteExecutionException;\r
import org.eclipse.ptp.remotetools.exception.RemoteOperationException;\r
import org.tizen.common.util.log.UserLogger;\r
+import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;\r
import org.tizen.nativeplatform.util.PlatformUserInteraction;\r
import org.tizen.nativeplatform.util.RootstrapUtil;\r
\r
UserLogger.start(PlatformUserInteraction.CATE_SYNCRONIZE, PlatformUserInteraction.SYNC_WORKSPACE);\r
RsyncProcessor processor = new RsyncProcessor(host, user, sshKeyPath);\r
UserLogger.end(PlatformUserInteraction.CATE_SYNCRONIZE, PlatformUserInteraction.SYNC_WORKSPACE);\r
- boolean result = processor.uploadSync(sourcePath, workspacePath, EXCLUDES, monitor);\r
+ boolean result = processor.uploadSync(sourcePath, workspacePath, EXCLUDES, false, monitor);\r
return result;\r
} catch (RemoteOperationException e) {\r
e.printStackTrace();\r
import org.tizen.nativeplatform.pkgmgr.PkgMgrInitializer;
import org.tizen.nativeplatform.pkgmgr.ui.RPMPackageDialog;
import org.tizen.nativeplatform.remote.connection.RemoteConnectionManager;
-import org.tizen.nativeplatform.remote.connection.RootstrapSynchronizer;
-import org.tizen.nativeplatform.remote.connection.RsyncProcessor;
+import org.tizen.nativeplatform.remote.synchronize.RootstrapSynchronizer;
+import org.tizen.nativeplatform.remote.synchronize.RsyncProcessor;
import org.tizen.nativeplatform.repo.commander.LocalRepoMounter;
import org.tizen.nativeplatform.repo.commander.RepoManager;
import org.tizen.nativeplatform.repo.model.Repository;
String sshKey = RemoteConnectionManager.getRemoteTools().getPrivateKey();
String localRogenPath = RootstrapUtil.getRogenPath().toOSString();
RsyncProcessor processor = new RsyncProcessor(host, user, sshKey);
- processor.uploadSync(localRogenPath, basedir, null, new SubProgressMonitor(monitor, 1));
+ processor.uploadSync(localRogenPath, basedir, null, false, new SubProgressMonitor(monitor, 1));
}
} catch (RemoteOperationException e) {
e.printStackTrace();