/// <summary> /// Start doing whatever is needed for the supported type of action. /// </summary> /// <returns>'true' if the caller expects the main window to be shown, otherwise 'false'.</returns> public void StartWorking(Dictionary <string, string> commandLineArgs) { // "obtain"; // -p <$fwroot> _pathToRepository = commandLineArgs[CommandLineProcessor.projDir]; CloneResult result; using (var form = new Form()) { var getSharedProjectModel = new GetSharedProjectModel(); result = getSharedProjectModel.GetSharedProjectUsing(form, _pathToRepository, null, ProjectFilter, ChorusHubQuery, _pathToRepository, Utilities.OtherRepositories, CommonResources.kHowToSendReceiveExtantRepository); } if (result == null || // Not sure it can be null, but I (RBR) have a null ref crash report (LT-15094) string.IsNullOrWhiteSpace(result.ActualLocation) || // Not sure it can be null, but I (RBR) have a null ref crash report (LT-15094) result.CloneStatus != CloneStatus.Created) { return; } _currentStrategy = GetCurrentStrategy(result.ActualLocation); //If the repository has 0 commits neither the Project or Lift filters will identify it and the strategy will be null if (_currentStrategy == null || _currentStrategy.IsRepositoryEmpty(result.ActualLocation)) { Directory.Delete(result.ActualLocation, true); // Don't want the newly created empty folder to hang around and mess us up! MessageBox.Show(CommonResources.kEmptyRepoMsg, CommonResources.kRepoProblem); return; } _currentStrategy.FinishCloning(commandLineArgs, result.ActualLocation, null); }
/// <summary> /// Start doing whatever is needed for the supported type of action. /// </summary> /// <returns>'true' if the caller expects the main window to be shown, otherwise 'false'.</returns> public void StartWorking(Dictionary<string, string> commandLineArgs) { // "obtain"; // -p <$fwroot> _pathToRepository = commandLineArgs[CommandLineProcessor.projDir]; CloneResult result; using (var form = new Form()) { var getSharedProjectModel = new GetSharedProjectModel(); result = getSharedProjectModel.GetSharedProjectUsing(form, _pathToRepository, null, ProjectFilter, ChorusHubQuery, _pathToRepository, Utilities.OtherRepositories, CommonResources.kHowToSendReceiveExtantRepository); } if (result == null // Not sure it can be null, but I (RBR) have a null ref crash report (LT-15094) || string.IsNullOrWhiteSpace(result.ActualLocation) // Not sure it can be null, but I (RBR) have a null ref crash report (LT-15094) || result.CloneStatus != CloneStatus.Created) { return; } _currentStrategy = GetCurrentStrategy(result.ActualLocation); //If the repository has 0 commits neither the Project or Lift filters will identify it and the strategy will be null if (_currentStrategy == null || _currentStrategy.IsRepositoryEmpty(result.ActualLocation)) { Directory.Delete(result.ActualLocation, true); // Don't want the newly created empty folder to hang around and mess us up! MessageBox.Show(CommonResources.kEmptyRepoMsg, CommonResources.kRepoProblem); return; } _currentStrategy.FinishCloning(commandLineArgs, result.ActualLocation, null); }