Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
            }
        }
Beispiel #5
0
        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();
        }
Beispiel #6
0
        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);
            }
        }
Beispiel #7
0
        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);
            }
        }
Beispiel #8
0
        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);
            }
        }
Beispiel #9
0
        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);
        }
Beispiel #10
0
 private void SelectBranch()
 {
     GitFlowPage.ShowPage(TeamExplorerPageIds.GitBranches);
 }