RefreshRevisions() public method

public RefreshRevisions ( ) : void
return void
コード例 #1
0
        private void CherryPick_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (RevisionGrid.GetSelectedRevisions().Count != 1)
            {
                MessageBox.Show(this, _noRevisionSelectedMsgBox.Text, _noRevisionSelectedMsgBoxCaption.Text);
                return;
            }
            bool          formClosed = false;
            List <string> arguments  = new List <string>();
            bool          IsMerge    = Settings.Module.IsMerge(RevisionGrid.GetSelectedRevisions()[0].Guid);

            if (IsMerge && !autoParent.Checked)
            {
                GitRevision[] ParentsRevisions = Settings.Module.GetParents(RevisionGrid.GetSelectedRevisions()[0].Guid);
                var           choose           = new FormCherryPickMerge(ParentsRevisions);
                choose.ShowDialog(this);
                if (choose.OkClicked)
                {
                    arguments.Add("-m " + (choose.ParentsList.SelectedItems[0].Index + 1));
                }
                else
                {
                    formClosed = true;
                }
            }
            else if (IsMerge)
            {
                arguments.Add("-m 1");
            }

            if (checkAddReference.Checked)
            {
                arguments.Add("-x");
            }

            if (!formClosed)
            {
                MessageBox.Show(this, _cmdExecutedMsgBox.Text + " " + Environment.NewLine + Settings.Module.CherryPick(RevisionGrid.GetSelectedRevisions()[0].Guid, AutoCommit.Checked, string.Join(" ", arguments.ToArray())), _cmdExecutedMsgBoxCaption.Text);

                MergeConflictHandler.HandleMergeConflicts(this);

                RevisionGrid.RefreshRevisions();

                Cursor.Current = Cursors.Default;
            }
        }
コード例 #2
0
        private void CherryPick_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (RevisionGrid.GetRevisions().Count != 1)
            {
                MessageBox.Show("Select 1 revision to pick.", "Cherry pick");
                return;
            }
            bool   formClosed = false;
            string arguments  = "";
            bool   IsMerge    = GitCommandHelpers.IsMerge(RevisionGrid.GetRevisions()[0].Guid);

            if (IsMerge && !autoParent.Checked)
            {
                GitRevision[] ParentsRevisions = GitCommandHelpers.GetParents(RevisionGrid.GetRevisions()[0].Guid);
                var           choose           = new FormCherryPickMerge(ParentsRevisions);
                choose.ShowDialog();
                if (choose.OkClicked)
                {
                    arguments = "-m " + (choose.ParentsList.SelectedItems[0].Index + 1);
                }
                else
                {
                    formClosed = true;
                }
            }
            else if (IsMerge)
            {
                arguments = "-m 1";
            }

            if (!formClosed)
            {
                MessageBox.Show("Command executed " + Environment.NewLine + GitCommandHelpers.CherryPick(RevisionGrid.GetRevisions()[0].Guid, AutoCommit.Checked, arguments), "Cherry pick");

                MergeConflictHandler.HandleMergeConflicts();

                RevisionGrid.RefreshRevisions();

                Cursor.Current = Cursors.Default;
            }
        }
コード例 #3
0
 private void Checkout_Click(object sender, EventArgs e)
 {
     GitUICommands.Instance.StartCheckoutBranchDialog(this);
     RevisionGrid.RefreshRevisions();
 }
コード例 #4
0
 private void Checkout_Click(object sender, EventArgs e)
 {
     GitUICommands.Instance.StartCheckoutBranchDialog();
     MergeConflictHandler.HandleMergeConflicts();
     RevisionGrid.RefreshRevisions();
 }