public void SourceControlGetLatestVersion(object sender, System.Windows.RoutedEventArgs e) { if (Reporter.ToUser(eUserMsgKeys.LoseChangesWarn) == Amdocs.Ginger.Common.MessageBoxResult.No) return; Reporter.ToGingerHelper(eGingerHelperMsgKey.GetLatestFromSourceControl); if (string.IsNullOrEmpty(this.NodePath())) Reporter.ToUser(eUserMsgKeys.SourceControlUpdateFailed, "Invalid Path provided"); else SourceControlIntegration.GetLatest(this.NodePath(), App.UserProfile.Solution.SourceControl); mTreeView.Tree.RefreshSelectedTreeNodeParent(); Reporter.CloseGingerHelper(); }
public void SourceControlGetLatestVersion(object sender, System.Windows.RoutedEventArgs e) { if (Reporter.ToUser(eUserMsgKey.LoseChangesWarn) == Amdocs.Ginger.Common.eUserMsgSelection.No) { return; } Reporter.ToStatus(eStatusMsgKey.GetLatestFromSourceControl); if (string.IsNullOrEmpty(this.NodePath())) { Reporter.ToUser(eUserMsgKey.SourceControlUpdateFailed, "Invalid Path provided"); } else { SourceControlIntegration.GetLatest(this.NodePath(), WorkSpace.Instance.Solution.SourceControl); } Reporter.HideStatusMessage(); }
private void btnSourceControlGetLatest_Click(object sender, RoutedEventArgs e) { if (Reporter.ToUser(eUserMsgKey.LoseChangesWarn) == Amdocs.Ginger.Common.eUserMsgSelection.No) { return; } Reporter.ToStatus(eStatusMsgKey.GetLatestFromSourceControl); if (string.IsNullOrEmpty(WorkSpace.Instance.Solution.Folder)) { Reporter.ToUser(eUserMsgKey.SourceControlUpdateFailed, "Invalid Path provided"); } else { SourceControlIntegration.GetLatest(WorkSpace.Instance.Solution.Folder, WorkSpace.Instance.Solution.SourceControl); } App.OnAutomateBusinessFlowEvent(AutomateEventArgs.eEventType.UpdateAppAgentsMapping, null); Reporter.HideStatusMessage(); }
public void SourceControlGetLatestVersion(object sender, System.Windows.RoutedEventArgs e) { if (Reporter.ToUser(eUserMsgKeys.LoseChangesWarn) == MessageBoxResult.No) { return; } Reporter.ToGingerHelper(eGingerHelperMsgKey.GetLatestFromSourceControl); if (string.IsNullOrEmpty(this.NodePath())) { Reporter.ToUser(eUserMsgKeys.SourceControlUpdateFailed, "Invalid Path provided"); } else { SourceControlIntegration.GetLatest(this.NodePath(), App.UserProfile.Solution.SourceControl); } App.LocalRepository.RefreshCacheByItemType(this.NodeObjectType(), Path.GetDirectoryName(this.NodePath())); mTreeView.Tree.RefreshSelectedTreeNodeParent(); Reporter.CloseGingerHelper(); }
private void btnSourceControlGetLatest_Click(object sender, RoutedEventArgs e) { if (Reporter.ToUser(eUserMsgKeys.LoseChangesWarn) == MessageBoxResult.No) { return; } AutoLogProxy.UserOperationStart("btnSourceControlGetLatest_Click"); Reporter.ToGingerHelper(eGingerHelperMsgKey.GetLatestFromSourceControl); if (string.IsNullOrEmpty(App.UserProfile.Solution.Folder)) { Reporter.ToUser(eUserMsgKeys.SourceControlUpdateFailed, "Invalid Path provided"); } else { SourceControlIntegration.GetLatest(App.UserProfile.Solution.Folder, App.UserProfile.Solution.SourceControl); } App.UpdateApplicationsAgentsMapping(false); Reporter.CloseGingerHelper(); AutoLogProxy.UserOperationEnd(); }
private void btnSourceControlGetLatest_Click(object sender, RoutedEventArgs e) { if (Reporter.ToUser(eUserMsgKey.LoseChangesWarn) == Amdocs.Ginger.Common.eUserMsgSelection.No) { return; } AutoLogProxy.UserOperationStart("btnSourceControlGetLatest_Click"); Reporter.ToStatus(eStatusMsgKey.GetLatestFromSourceControl); if (string.IsNullOrEmpty(WorkSpace.UserProfile.Solution.Folder)) { Reporter.ToUser(eUserMsgKey.SourceControlUpdateFailed, "Invalid Path provided"); } else { SourceControlIntegration.GetLatest(WorkSpace.UserProfile.Solution.Folder, WorkSpace.UserProfile.Solution.SourceControl); } App.UpdateApplicationsAgentsMapping(false); Reporter.HideStatusMessage(); AutoLogProxy.UserOperationEnd(); }
public bool GetLatest(string path, SourceControlBase SourceControl) { return(SourceControlIntegration.GetLatest(path, SourceControl)); }
public void DownloadSolution(string SolutionFolder) { SourceControlBase mSourceControl; if (WorkSpace.Instance.UserProfile.SourceControlType == SourceControlBase.eSourceControlType.GIT) { mSourceControl = new GITSourceControl(); } else if (WorkSpace.Instance.UserProfile.SourceControlType == SourceControlBase.eSourceControlType.SVN) { mSourceControl = new SVNSourceControl(); } else { mSourceControl = new SVNSourceControl(); } if (mSourceControl != null) { WorkSpace.Instance.UserProfile.SourceControlType = mSourceControl.GetSourceControlType; mSourceControl.SourceControlURL = WorkSpace.Instance.UserProfile.SourceControlURL; mSourceControl.SourceControlUser = WorkSpace.Instance.UserProfile.SourceControlUser; mSourceControl.SourceControlPass = WorkSpace.Instance.UserProfile.SourceControlPass; mSourceControl.SourceControlLocalFolder = WorkSpace.Instance.UserProfile.SourceControlLocalFolder; mSourceControl.SolutionFolder = SolutionFolder; mSourceControl.SourceControlConfigureProxy = WorkSpace.Instance.UserProfile.SolutionSourceControlConfigureProxy; mSourceControl.SourceControlProxyAddress = WorkSpace.Instance.UserProfile.SolutionSourceControlProxyAddress; mSourceControl.SourceControlProxyPort = WorkSpace.Instance.UserProfile.SolutionSourceControlProxyPort; mSourceControl.SourceControlTimeout = WorkSpace.Instance.UserProfile.SolutionSourceControlTimeout; mSourceControl.supressMessage = true; } if (WorkSpace.Instance.UserProfile.SourceControlLocalFolder == string.Empty) { Reporter.ToUser(eUserMsgKey.SourceControlConnMissingLocalFolderInput); } if (SolutionFolder.EndsWith("\\")) { SolutionFolder = SolutionFolder.Substring(0, SolutionFolder.Length - 1); } SolutionInfo sol = new SolutionInfo(); sol.LocalFolder = SolutionFolder; if (WorkSpace.Instance.UserProfile.SourceControlType == SourceControlBase.eSourceControlType.SVN && Directory.Exists(PathHelper.GetLongPath(sol.LocalFolder))) { sol.ExistInLocaly = true; } else if (WorkSpace.Instance.UserProfile.SourceControlType == SourceControlBase.eSourceControlType.GIT && Directory.Exists(PathHelper.GetLongPath(sol.LocalFolder + @"\.git"))) { sol.ExistInLocaly = true; } else { sol.ExistInLocaly = false; } sol.SourceControlLocation = SolutionFolder.Substring(SolutionFolder.LastIndexOf("\\") + 1); if (sol == null) { Reporter.ToUser(eUserMsgKey.AskToSelectSolution); return; } string ProjectURI = string.Empty; if (WorkSpace.Instance.UserProfile.SourceControlType == SourceControlBase.eSourceControlType.SVN) { ProjectURI = WorkSpace.Instance.UserProfile.SourceControlURL.StartsWith("SVN", StringComparison.CurrentCultureIgnoreCase) ? sol.SourceControlLocation : WorkSpace.Instance.UserProfile.SourceControlURL + sol.SourceControlLocation; } else { ProjectURI = WorkSpace.Instance.UserProfile.SourceControlURL; } bool getProjectResult = true; getProjectResult = SourceControlIntegration.CreateConfigFile(mSourceControl); if (getProjectResult != true) { return; } if (sol.ExistInLocaly == true) { mSourceControl.RepositoryRootFolder = sol.LocalFolder; SourceControlIntegration.GetLatest(sol.LocalFolder, mSourceControl); } else { getProjectResult = SourceControlIntegration.GetProject(mSourceControl, sol.LocalFolder, ProjectURI); } }