예제 #1
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);
        }
예제 #2
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);
        }
예제 #3
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);
        }
예제 #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);
            }
        }
예제 #5
0
        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";
            }
        }
예제 #6
0
        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";
            }
        }
예제 #7
0
        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();
        }
예제 #8
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();
        }
예제 #9
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);
            }
        }
예제 #10
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);
            }
        }
예제 #11
0
        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);
            }
        }
예제 #12
0
        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);
            }
		}
예제 #13
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);
            }
        }
예제 #14
0
        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);
            }

        }
예제 #15
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);
        }
예제 #16
0
        private static Visibility OnMainBranch()
        {
            var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow);

            return(gf.IsOnDevelopBranch || gf.IsOnMasterBranch ? Visibility.Visible : Visibility.Collapsed);
        }
예제 #17
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);
        }
예제 #18
0
        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);
		}
예제 #19
0
        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);
            }

        }
예제 #20
0
        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);
            }
		}
예제 #21
0
        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);
            }

        }
예제 #22
0
 private static Visibility OnMainBranch()
 {
     var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepoPath, GitFlowPage.OutputWindow);
     return gf.IsOnDevelopBranch || gf.IsOnMasterBranch ? Visibility.Visible : Visibility.Collapsed;
 }