private void FinishFeature() { DateTime start = DateTime.Now; var properties = new Dictionary <string, string> { { "RebaseOnDevelopmentBranch", FeatureRebaseOnDevelopmentBranch.ToString() }, { "DeleteBranch", FeatureDeleteBranch.ToString() } }; Logger.Event("FinishFeature", properties); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.FinishFeature(SelectedFeature.Name, FeatureRebaseOnDevelopmentBranch, FeatureDeleteBranch); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowFinishFeature = Visibility.Collapsed; UpdateMenus(); HideAll(); OnPropertyChanged("AllFeatures"); Te.Refresh(); } Logger.Metric("Duration-FinishFeature", (DateTime.Now - start).Milliseconds); }
private void StartHotfix() { if (String.IsNullOrEmpty(HotfixName)) { return; } Logger.Event("StartHotfix"); DateTime start = DateTime.Now; if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.StartHotfix(HotfixName); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowStartHotfix = Visibility.Collapsed; HotfixName = String.Empty; UpdateMenus(); HideAll(); OnPropertyChanged("AllHotfixes"); } Logger.Metric("Duration-StartHotfix", (DateTime.Now - start).Milliseconds); }
private void FinishHotfix() { DateTime start = DateTime.Now; var properties = new Dictionary <string, string> { { "TaggedRelease", (!String.IsNullOrEmpty(HotfixTagMessage)).ToString() }, { "DeleteBranch", HotfixDeleteBranch.ToString() }, { "ForceDeletion", HotfixForceDeletion.ToString() }, { "PushChanges", HotfixPushChanges.ToString() } }; Logger.Event("FinishHotfix", properties); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.FinishHotfix(SelectedHotfix.Name, HotfixTagMessage, HotfixDeleteBranch, HotfixForceDeletion, HotfixPushChanges); if (!result.Success) { ShowErrorMessage(result); } HideAll(); HideProgressBar(); ShowFinishHotfix = Visibility.Collapsed; OnPropertyChanged("AllHotfixes"); UpdateMenus(); } Logger.Metric("Duration-FinishHotfix", (DateTime.Now - start).Milliseconds); }
private void FinishFeature() { try { DateTime start = DateTime.Now; var properties = new Dictionary <string, string> { { "RebaseOnDevelopmentBranch", FeatureRebaseOnDevelopmentBranch.ToString() }, { "DeleteLocalBranch", FeatureDeleteLocalBranch.ToString() }, { "DeleteRemoteBranch", FeatureDeleteRemoteBranch.ToString() }, { "Squash", FeatureSquash.ToString() }, { "NoFastForward", FeatureNoFastForward.ToString() } }; Logger.Event("FinishFeature", properties); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); if (FeatureSquash) { ShowInfoMessage("Waiting for your editor to close the file..."); } var result = gf.FinishFeature(SelectedFeature.Name, FeatureRebaseOnDevelopmentBranch, FeatureDeleteLocalBranch, FeatureDeleteRemoteBranch, FeatureSquash, FeatureNoFastForward); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowFinishFeature = Visibility.Collapsed; UpdateMenus(); HideAll(); OnPropertyChanged("AllFeatures"); if (result.Success) { Te.Refresh(); } } Logger.Metric("Duration-FinishFeature", (DateTime.Now - start).Milliseconds); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private void InitializeModel() { SelectBranchCommand = new RelayCommand(p => SelectBranch(), p => CanSelectBranch); if (!String.IsNullOrEmpty(GitFlowPage.ActiveRepoPath)) { var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); CurrentBranch = gf.CurrentBranchLeafName; } else { CurrentBranch = "No branch selected"; } }
private void InitializeModel() { SelectBranchCommand = new RelayCommand(p => SelectBranch(), p => CanSelectBranch); if (!String.IsNullOrEmpty(GitFlowPage.ActiveRepoPath)) { var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); CurrentBranch = gf.CurrentBranchLeafName; } else { CurrentBranch = "No branch selected"; } }
public void TrackFeatureBranch() { Logger.Event("TrackFeatureBranch"); GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.TrackFeature(SelectedFeature.Name); if (!result.Success) { Te.ShowErrorNotification(result.CommandOutput); } HideProgressBar(); Update(); }
public void CheckoutFeatureBranch() { Logger.Event("CheckoutFeatureBranch"); GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.CheckoutFeature(SelectedFeature.Name); if (!result.Success) { Te.ShowErrorNotification(result.CommandOutput); } HideProgressBar(); Update(); }
private void StartRelease() { try { if (String.IsNullOrEmpty(ReleaseName)) { return; } Logger.Event("StartRelease"); DateTime start = DateTime.Now; if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.StartRelease(ReleaseName); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowStartRelease = Visibility.Collapsed; ReleaseName = String.Empty; UpdateMenus(); HideAll(); OnPropertyChanged("AllReleases"); if (result.Success) { Te.Refresh(); } } Logger.Metric("Duration-StartRelease", (DateTime.Now - start).Milliseconds); } catch (ArgumentException ex) { ShowErrorMessage(ex.Message); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private void FinishRelease() { try { DateTime start = DateTime.Now; var properties = new Dictionary <string, string> { { "TaggedRelease", (!String.IsNullOrEmpty(ReleaseTagMessage)).ToString() }, { "DeleteBranch", ReleaseDeleteBranch.ToString() }, { "ForceDeletion", ReleaseForceDeletion.ToString() }, { "PushChanges", ReleasePushChanges.ToString() }, { "NoBackMerge", ReleaseNoBackMerge.ToString() } }; Logger.Event("FinishRelease", properties); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.FinishRelease(SelectedRelease.Name, ReleaseTagMessage, ReleaseDeleteBranch, ReleaseForceDeletion, ReleasePushChanges, ReleaseNoBackMerge); if (!result.Success) { ShowErrorMessage(result); } HideAll(); HideProgressBar(); ShowFinishRelease = Visibility.Collapsed; OnPropertyChanged("AllReleases"); UpdateMenus(); if (result.Success) { Te.Refresh(); } } Logger.Metric("Duration-FinishRelease", (DateTime.Now - start).Milliseconds); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private void OnInitialize() { try { DateTime start = DateTime.Now; Logger.Event("Init"); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.OutputWindow.Activate(); ProgressVisibility = Visibility.Visible; var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepo.RepositoryPath, GitFlowPage.OutputWindow); var result = gf.Init(new GitFlowRepoSettings { DevelopBranch = Develop, MasterBranch = Master, FeatureBranch = FeaturePrefix, BugfixBranch = BugfixPrefix, ReleaseBranch = ReleasePrefix, SupportBranch = SupportPrefix, HotfixBranch = HotfixPrefix, VersionTag = VersionTagPrefix }); if (!result.Success) { Te.ShowErrorNotification(result.CommandOutput); } ProgressVisibility = Visibility.Hidden; InitGridVisibility = Visibility.Hidden; Te.Refresh(); } Logger.Metric("Duration-Init", (DateTime.Now - start).Milliseconds); } catch (Exception e) { Te.ShowErrorNotification(e.ToString()); Logger.Exception(e); } }
private void OnInitialize() { try { DateTime start = DateTime.Now; Logger.Event("Init"); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.OutputWindow.Activate(); ProgressVisibility = Visibility.Visible; var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepo.RepositoryPath, GitFlowPage.OutputWindow); var result = gf.Init(new GitFlowRepoSettings { DevelopBranch = Develop, MasterBranch = Master, FeatureBranch = FeaturePrefix, ReleaseBranch = ReleasePrefix, HotfixBranch = HotfixPrefix, VersionTag = VersionTagPrefix }); if (!result.Success) { Te.ShowErrorNotification(result.CommandOutput); } ProgressVisibility = Visibility.Hidden; InitGridVisibility = Visibility.Hidden; Te.Refresh(); } Logger.Metric("Duration-Init", (DateTime.Now - start).Milliseconds); } catch (Exception e) { Te.ShowErrorNotification(e.ToString()); Logger.Exception(e); } }
public void PublishReleaseBranch() { try { Logger.Event("PublishReleaseBranch"); GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.PublishRelease(SelectedRelease.Name); if (!result.Success) { Te.ShowErrorNotification(result.CommandOutput); } HideProgressBar(); Update(); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
public void PublishFeatureBranch() { try { Logger.Event("PublishFeatureBranch"); GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.PublishFeature(SelectedFeature.Name); if (!result.Success) { Te.ShowErrorNotification(result.CommandOutput); } HideProgressBar(); Update(); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private void StartFeature() { Logger.Event("StartFeature"); DateTime start = DateTime.Now; if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.StartFeature(FeatureName); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); FeatureName = String.Empty; UpdateMenus(); HideAll(); OnPropertyChanged("AllFeatures"); } Logger.Metric("Duration-StartFeature", (DateTime.Now - start).Milliseconds); }
private static Visibility OnMainBranch() { var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); return(gf.IsOnDevelopBranch || gf.IsOnMasterBranch ? Visibility.Visible : Visibility.Collapsed); }
private void StartFeature() { Logger.Event("StartFeature"); DateTime start = DateTime.Now; if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.StartFeature(FeatureName); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); FeatureName = String.Empty; UpdateMenus(); HideAll(); OnPropertyChanged("AllFeatures"); } Logger.Metric("Duration-StartFeature", (DateTime.Now-start).Milliseconds); }
private void StartRelease() { if (String.IsNullOrEmpty(ReleaseName)) return; Logger.Event("StartRelease"); DateTime start = DateTime.Now; if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.StartRelease(ReleaseName); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowStartRelease = Visibility.Collapsed; ReleaseName = String.Empty; UpdateMenus(); HideAll(); OnPropertyChanged("AllReleases"); } Logger.Metric("Duration-StartRelease", (DateTime.Now - start).Milliseconds); }
private void StartHotfix() { try { if (String.IsNullOrEmpty(HotfixName)) return; Logger.Event("StartHotfix"); DateTime start = DateTime.Now; if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.StartHotfix(HotfixName); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowStartHotfix = Visibility.Collapsed; HotfixName = String.Empty; UpdateMenus(); HideAll(); OnPropertyChanged("AllHotfixes"); } Logger.Metric("Duration-StartHotfix", (DateTime.Now - start).Milliseconds); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private void FinishFeature() { try { DateTime start = DateTime.Now; var properties = new Dictionary<string, string> { {"RebaseOnDevelopmentBranch", FeatureRebaseOnDevelopmentBranch.ToString()}, {"DeleteBranch", FeatureDeleteBranch.ToString()} }; Logger.Event("FinishFeature", properties); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.FinishFeature(SelectedFeature.Name, FeatureRebaseOnDevelopmentBranch, FeatureDeleteBranch); if (!result.Success) { ShowErrorMessage(result); } HideProgressBar(); ShowFinishFeature = Visibility.Collapsed; UpdateMenus(); HideAll(); OnPropertyChanged("AllFeatures"); Te.Refresh(); } Logger.Metric("Duration-FinishFeature", (DateTime.Now - start).Milliseconds); } catch( Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private void FinishHotfix() { try { DateTime start = DateTime.Now; var properties = new Dictionary<string, string> { {"TaggedRelease", (!String.IsNullOrEmpty(HotfixTagMessage)).ToString()}, {"DeleteBranch", HotfixDeleteBranch.ToString()}, {"ForceDeletion", HotfixForceDeletion.ToString()}, {"PushChanges", HotfixPushChanges.ToString()} }; Logger.Event("FinishHotfix", properties); if (GitFlowPage.ActiveRepo != null) { GitFlowPage.ActiveOutputWindow(); ShowProgressBar(); var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); var result = gf.FinishHotfix(SelectedHotfix.Name, HotfixTagMessage, HotfixDeleteBranch, HotfixForceDeletion, HotfixPushChanges); if (!result.Success) { ShowErrorMessage(result); } HideAll(); HideProgressBar(); ShowFinishHotfix = Visibility.Collapsed; OnPropertyChanged("AllHotfixes"); UpdateMenus(); } Logger.Metric("Duration-FinishHotfix", (DateTime.Now - start).Milliseconds); } catch (Exception ex) { ShowErrorMessage(ex.ToString()); Logger.Exception(ex); } }
private static Visibility OnMainBranch() { var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow); return gf.IsOnDevelopBranch || gf.IsOnMasterBranch ? Visibility.Visible : Visibility.Collapsed; }