private void Start_Click(object sender, EventArgs e) { FormProcess.ShowDialog(this, GitCommandHelpers.StartBisectCmd()); UpdateButtonsState(); var revisions = _revisionGrid.GetSelectedRevisions(); if (revisions.Count > 1) { if (MessageBox.Show(this, _bisectStart.Text, Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { BisectRange(revisions.First().ObjectId, revisions.Last().ObjectId); Close(); } } return; void BisectRange(ObjectId startRevision, ObjectId endRevision) { var command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good, startRevision); var errorOccurred = !FormProcess.ShowDialog(this, command); if (errorOccurred) { return; } command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Bad, endRevision); FormProcess.ShowDialog(this, command); } }
private void Start_Click(object sender, EventArgs e) { FormProcess.ShowDialog(this, process: null, arguments: GitCommandHelpers.StartBisectCmd(), Module.WorkingDir, input: null, useDialogSettings: true); UpdateButtonsState(); var revisions = _revisionGrid.GetSelectedRevisions(); if (revisions.Count > 1) { if (MessageBox.Show(this, _bisectStart.Text, Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { BisectRange(revisions.First().ObjectId, revisions.Last().ObjectId); Close(); } } return; void BisectRange(ObjectId startRevision, ObjectId endRevision) { var command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good, startRevision); bool success = FormProcess.ShowDialog(this, process: null, arguments: command, Module.WorkingDir, input: null, useDialogSettings: true); if (!success) { return; } command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Bad, endRevision); FormProcess.ShowDialog(this, process: null, arguments: command, Module.WorkingDir, input: null, useDialogSettings: true); } }
private void BisectRange(string startRevision, string endRevision) { var command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good, startRevision); var errorOccurred = !FormProcess.ShowDialog(this, command); if (errorOccurred) { return; } command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Bad, endRevision); FormProcess.ShowDialog(this, command); }
public void ContinueBisectCmd() { Assert.AreEqual( "bisect good", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good)); Assert.AreEqual( "bisect bad", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Bad)); Assert.AreEqual( "bisect skip", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Skip)); Assert.AreEqual( "bisect good rev1 rev2", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good, "rev1", "rev2")); }
public void ContinueBisectCmd() { var id1 = ObjectId.Random(); var id2 = ObjectId.Random(); Assert.AreEqual( "bisect good", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good).Arguments); Assert.AreEqual( "bisect bad", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Bad).Arguments); Assert.AreEqual( "bisect skip", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Skip).Arguments); Assert.AreEqual( $"bisect good {id1} {id2}", GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good, id1, id2).Arguments); }
private void ContinueBisect(GitBisectOption bisectOption) { FormProcess.ShowDialog(this, GitCommandHelpers.ContinueBisectCmd(bisectOption), false); Close(); }
private void Bad_Click(object sender, EventArgs e) { Settings.CloseProcessDialog = false; new FormProcess(GitCommandHelpers.ContinueBisectCmd(false)).ShowDialog(); Close(); }
private void ContinueBisect(GitBisectOption bisectOption) { FormProcess.ShowDialog(this, process: null, arguments: GitCommandHelpers.ContinueBisectCmd(bisectOption), Module.WorkingDir, input: null, useDialogSettings: false); Close(); }
private void Bad_Click(object sender, EventArgs e) { new FormProcess(GitCommandHelpers.ContinueBisectCmd(false), false).ShowDialog(this); Close(); }