예제 #1
0
 private void cherryPickThisCommitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (FileChanges.GetSelectedRevisions().Count == 1)
     {
         var frm = new FormCherryPickCommitSmall(FileChanges.GetSelectedRevisions()[0]);
         frm.ShowDialog(this);
     }
 }
예제 #2
0
 private void cherryPickThisCommitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var selectedRevisions = FileChanges.GetSelectedRevisions();
     if (selectedRevisions.Count == 1)
     {
         var frm = new FormCherryPickCommitSmall(selectedRevisions[0]);
         frm.ShowDialog(this);
     }
 }
예제 #3
0
        private void cherryPickThisCommitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var selectedRevisions = FileChanges.GetSelectedRevisions();

            if (selectedRevisions.Count == 1)
            {
                using (var frm = new FormCherryPickCommitSmall(UICommands, selectedRevisions[0]))
                    frm.ShowDialog(this);
            }
        }
예제 #4
0
 private void cherryPickCommitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (RevisionList.Count > LastRow && LastRow >= 0)
     {
         FormCherryPickCommitSmall frm = new FormCherryPickCommitSmall((GitRevision)RevisionList[LastRow]);
         frm.ShowDialog();
         RefreshRevisions();
     }
 }
예제 #5
0
        private void CherryPickCommitToolStripMenuItemClick(object sender, EventArgs e)
        {
            var revisions = GetSelectedRevisions(SortDirection.Descending);

            FormCherryPickCommitSmall prevForm = null;

            try
            {
                foreach (var r in revisions)
                {
                    var frm = new FormCherryPickCommitSmall(UICommands, r);
                    if (prevForm != null)
                    {
                        frm.CopyOptions(prevForm);
                        prevForm.Dispose();
                    }
                    prevForm = frm;
                    if (frm.ShowDialog(this) != DialogResult.OK)
                    {
                        return;
                    }
                }
            }
            finally
            {
                if (prevForm != null)
                {
                    prevForm.Dispose();
                }
            }

            ForceRefreshRevisions();
            OnActionOnRepositoryPerformed();
        }
예제 #6
0
        private void CherryPickCommitToolStripMenuItemClick(object sender, EventArgs e)
        {
            if (Revisions.RowCount <= LastRow || LastRow < 0)
                return;

            var frm = new FormCherryPickCommitSmall(GetRevision(LastRow));
            frm.ShowDialog();
            RefreshRevisions();
            OnActionOnRepositoryPerformed();
        }
 public void CopyOptions(FormCherryPickCommitSmall source)
 {
     AutoCommit.Checked        = source.AutoCommit.Checked;
     checkAddReference.Checked = source.checkAddReference.Checked;
 }
 public void CopyOptions(FormCherryPickCommitSmall source)
 {
     AutoCommit.Checked = source.AutoCommit.Checked;
     checkAddReference.Checked = source.checkAddReference.Checked;
 }
예제 #9
0
        public bool StartCherryPickDialog(IWin32Window owner, GitRevision revision)
        {
            // TODO: compare this code with StartArchiveDialog(...). Which one is to use?

            if (!RequiresValidWorkingDir(owner))
            {
                return false;
            }

            if (!InvokeEvent(owner, PreCherryPick))
            {
                return true;
            }

            using (var form = new FormCherryPickCommitSmall(this, revision))
            {
                if (form.ShowDialog(owner) == DialogResult.OK)
                {
                    InvokeEvent(owner, PostCherryPick);
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
예제 #10
0
        private void CherryPickCommitToolStripMenuItemClick(object sender, EventArgs e)
        {
            var revisions = GetSelectedRevisions(SortDirection.Descending);

            FormCherryPickCommitSmall prevForm = null;
            try
            {
                foreach (var r in revisions)
                    if (Settings.CherryPickSilently && !Settings.Module.IsMerge(r.Guid))
                    {
                        FormProcess.ShowDialog(this, GitCommandHelpers.CherryPickCmd(r.Guid, true, Settings.CherryPickAddsReference ? "-x" : ""));
                        MergeConflictHandler.HandleMergeConflicts(this, true);
                    }
                    else
                    {
                        var frm = new FormCherryPickCommitSmall(r);
                        if (prevForm != null)
                        {
                            frm.CopyOptions(prevForm);
                            prevForm.Dispose();
                        }
                        prevForm = frm;
                        if (frm.ShowDialog(this) != DialogResult.OK)
                            break;
                    }
            }
            finally
            {
                if (prevForm != null)
                    prevForm.Dispose();
            }

            ForceRefreshRevisions();
            OnActionOnRepositoryPerformed();
        }