IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
APISession api = iRepo.getAPISession();
try
{
// First we will establish a connection to the MKS Integrity Server
Response res = api.connect( iRepo.getHost(), iRepo.getPort(), iRepo.getUser(), iRepo.getPassword() );
int exitCode = res.getExitCode();
boolean success = ( exitCode == 0 ? true : false );
result = new LoginScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
// Next we will prepare the Project and Sandbox for the other commands