Browse Source

Removed annoying messageboxes. Improved patch and rebase features

LibGit2Sharp 1.30
Henk Westhuis 17 years ago
parent
commit
281f05a20b
  1. 12
      GitCommands/GitCommands/Git/GitCommands.cs
  2. 2
      GitUI/AboutBox.Designer.cs
  3. 13
      GitUI/Browse.cs
  4. 37
      GitUI/FormRebase.Designer.cs
  5. 20
      GitUI/FormRebase.cs
  6. BIN
      GitUI/Icons/Rebase.png
  7. 12
      GitUI/MergeConflictHandler.cs
  8. 123
      GitUI/MergePatch.Designer.cs
  9. 81
      GitUI/MergePatch.cs
  10. 2
      SimpleExt/ReleaseMinDependency/mt.dep
  11. BIN
      SimpleExt/ReleaseMinDependency/vc90.idb
  12. 2
      SimpleExt/SimpleExt.h

12
GitCommands/GitCommands/Git/GitCommands.cs

@ -760,11 +760,21 @@ namespace GitCommands
static public bool InTheMiddleOfRebase()
{
if (Directory.Exists(GetRebaseDir())) return true;
if (!File.Exists(GetRebaseDir() + "applying") &&
Directory.Exists(GetRebaseDir())) return true;
return false;
}
static public bool InTheMiddleOfPatch()
{
if (!File.Exists(GetRebaseDir() + "rebasing") &&
Directory.Exists(GetRebaseDir())) return true;
return false;
}
static public string GetNextRebasePatch()
{
string file = GetRebaseDir() + "next";

2
GitUI/AboutBox.Designer.cs

@ -116,7 +116,7 @@
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(271, 17);
this.labelVersion.TabIndex = 0;
this.labelVersion.Text = "Version 1.28";
this.labelVersion.Text = "Version 1.30";
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.labelVersion.Click += new System.EventHandler(this.labelVersion_Click);
//

13
GitUI/Browse.cs

@ -69,11 +69,15 @@ namespace GitUI
Workingdir.Text = GitCommands.Settings.WorkingDir;
if (GitCommands.Settings.ValidWorkingDir() && Directory.Exists(GitCommands.Settings.WorkingDir + ".git\\rebase-apply\\"))
if (GitCommands.Settings.ValidWorkingDir() && (GitCommands.GitCommands.InTheMiddleOfRebase() || GitCommands.GitCommands.InTheMiddleOfPatch()))
{
if (rebase == null)
{
rebase = ToolStrip.Items.Add("You are in the middle of a rebase");
if (GitCommands.GitCommands.InTheMiddleOfRebase())
rebase = ToolStrip.Items.Add("You are in the middle of a rebase");
else
rebase = ToolStrip.Items.Add("You are in the middle of a patch apply");
rebase.BackColor = Color.Salmon;
rebase.Click += new EventHandler(rebase_Click);
}
@ -111,7 +115,10 @@ namespace GitUI
void rebase_Click(object sender, EventArgs e)
{
new FormRebase().ShowDialog();
if (GitCommands.GitCommands.InTheMiddleOfRebase())
new FormRebase().ShowDialog();
else
new MergePatch().ShowDialog();
Initialize();
}

37
GitUI/FormRebase.Designer.cs

@ -44,8 +44,8 @@
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.label3 = new System.Windows.Forms.Label();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.patchGrid1 = new GitUI.PatchGrid();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.patchGrid1 = new GitUI.PatchGrid();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@ -83,7 +83,7 @@
//
this.Ok.Location = new System.Drawing.Point(3, 47);
this.Ok.Name = "Ok";
this.Ok.Size = new System.Drawing.Size(102, 23);
this.Ok.Size = new System.Drawing.Size(108, 23);
this.Ok.TabIndex = 7;
this.Ok.Text = "Rebase";
this.Ok.UseVisualStyleBackColor = true;
@ -110,7 +110,7 @@
//
this.AddFiles.Location = new System.Drawing.Point(3, 152);
this.AddFiles.Name = "AddFiles";
this.AddFiles.Size = new System.Drawing.Size(102, 23);
this.AddFiles.Size = new System.Drawing.Size(108, 23);
this.AddFiles.TabIndex = 14;
this.AddFiles.Text = "Add files";
this.AddFiles.UseVisualStyleBackColor = true;
@ -120,7 +120,7 @@
//
this.Resolved.Location = new System.Drawing.Point(3, 199);
this.Resolved.Name = "Resolved";
this.Resolved.Size = new System.Drawing.Size(102, 23);
this.Resolved.Size = new System.Drawing.Size(108, 23);
this.Resolved.TabIndex = 13;
this.Resolved.Text = "Continue rebase";
this.Resolved.UseVisualStyleBackColor = true;
@ -130,7 +130,7 @@
//
this.Abort.Location = new System.Drawing.Point(3, 257);
this.Abort.Name = "Abort";
this.Abort.Size = new System.Drawing.Size(102, 23);
this.Abort.Size = new System.Drawing.Size(108, 23);
this.Abort.TabIndex = 12;
this.Abort.Text = "Abort";
this.Abort.UseVisualStyleBackColor = true;
@ -140,7 +140,7 @@
//
this.Skip.Location = new System.Drawing.Point(3, 228);
this.Skip.Name = "Skip";
this.Skip.Size = new System.Drawing.Size(102, 23);
this.Skip.Size = new System.Drawing.Size(108, 23);
this.Skip.TabIndex = 11;
this.Skip.Text = "Skip this commit";
this.Skip.UseVisualStyleBackColor = true;
@ -150,7 +150,7 @@
//
this.Mergetool.Location = new System.Drawing.Point(2, 98);
this.Mergetool.Name = "Mergetool";
this.Mergetool.Size = new System.Drawing.Size(102, 23);
this.Mergetool.Size = new System.Drawing.Size(108, 23);
this.Mergetool.TabIndex = 10;
this.Mergetool.Text = "Solve conflicts";
this.Mergetool.UseVisualStyleBackColor = true;
@ -160,7 +160,6 @@
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
@ -177,7 +176,7 @@
this.splitContainer1.Panel2.Controls.Add(this.Resolved);
this.splitContainer1.Panel2.Controls.Add(this.Skip);
this.splitContainer1.Size = new System.Drawing.Size(675, 368);
this.splitContainer1.SplitterDistance = 564;
this.splitContainer1.SplitterDistance = 557;
this.splitContainer1.TabIndex = 17;
//
// splitContainer2
@ -199,7 +198,7 @@
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer2.Size = new System.Drawing.Size(564, 368);
this.splitContainer2.Size = new System.Drawing.Size(557, 368);
this.splitContainer2.SplitterDistance = 74;
this.splitContainer2.TabIndex = 0;
//
@ -220,7 +219,7 @@
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.patchGrid1);
this.splitContainer3.Size = new System.Drawing.Size(564, 290);
this.splitContainer3.Size = new System.Drawing.Size(557, 290);
this.splitContainer3.SplitterDistance = 16;
this.splitContainer3.TabIndex = 0;
//
@ -252,14 +251,6 @@
this.splitContainer4.SplitterDistance = 80;
this.splitContainer4.TabIndex = 18;
//
// patchGrid1
//
this.patchGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.patchGrid1.Location = new System.Drawing.Point(0, 0);
this.patchGrid1.Name = "patchGrid1";
this.patchGrid1.Size = new System.Drawing.Size(564, 270);
this.patchGrid1.TabIndex = 16;
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.White;
@ -272,6 +263,14 @@
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// patchGrid1
//
this.patchGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.patchGrid1.Location = new System.Drawing.Point(0, 0);
this.patchGrid1.Name = "patchGrid1";
this.patchGrid1.Size = new System.Drawing.Size(557, 270);
this.patchGrid1.TabIndex = 16;
//
// FormRebase
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

20
GitUI/FormRebase.cs

@ -57,21 +57,20 @@ namespace GitUI
Abort.Enabled = false;
}
Resolved.Text = "Continue rebase";
Mergetool.Text = "Solve conflicts";
if (GitCommands.GitCommands.InTheMiddleOfConflictedMerge())
{
if (MessageBox.Show("There are mergeconflicts and a rebase is progress, solve conflicts?", "Solve conflics", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
Mergetool_Click(null, null);
}
Mergetool.Text = ">Solve conflicts<";
}
else
if (GitCommands.GitCommands.InTheMiddleOfRebase())
{
if (MessageBox.Show("There are no mergeconflicts and a rebase is progress, continue rebase?\n\nIf you get this dialog a few times, choose no and read output.", "Continue rebase", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
Resolved_Click(null, null);
}
Resolved.Text = ">Continue rebase<";
}
}
private void Mergetool_Click(object sender, EventArgs e)
@ -124,11 +123,6 @@ namespace GitUI
FormProcess form = new FormProcess(GitCommands.GitCommands.RebaseCmd(Branches.Text));
if (form.outputString.ToString().Trim() == "Current branch a is up to date.")
MessageBox.Show("Current branch a is up to date.\nNothing to rebase.", "Rebase");
else
if (string.IsNullOrEmpty(form.outputString.ToString()))
{
MessageBox.Show("Done.", "Rebase");
}
EnableButtons();
patchGrid1.Initialize();

BIN
GitUI/Icons/Rebase.png

Before

Width: 77  |  Height: 239  |  Size: 6.1 KiB

After

Width: 77  |  Height: 250  |  Size: 6.1 KiB

12
GitUI/MergeConflictHandler.cs

@ -57,9 +57,19 @@ namespace GitUI
new FormResolveConflicts().ShowDialog();
}
if (GitCommands.GitCommands.InTheMiddleOfPatch())
{
if (MessageBox.Show("You are in the middle of a patch apply, continue patch apply?", "Patch apply", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
new MergePatch().ShowDialog();
}
}
else
if (GitCommands.GitCommands.InTheMiddleOfRebase())
{
if (MessageBox.Show("You are in the middle of a rebase (or patch apply), continue rebase?", "Rebase", MessageBoxButtons.YesNo) == DialogResult.Yes)
if (MessageBox.Show("You are in the middle of a rebase , continue rebase?", "Rebase", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
new FormRebase().ShowDialog();
}

123
GitUI/MergePatch.Designer.cs

@ -30,7 +30,6 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MergePatch));
this.BrowsePatch = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.PatchFile = new System.Windows.Forms.TextBox();
this.Apply = new System.Windows.Forms.Button();
this.Mergetool = new System.Windows.Forms.Button();
@ -38,9 +37,13 @@
this.Abort = new System.Windows.Forms.Button();
this.Resolved = new System.Windows.Forms.Button();
this.AddFiles = new System.Windows.Forms.Button();
this.patchGrid1 = new GitUI.PatchGrid();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.PatchFileMode = new System.Windows.Forms.RadioButton();
this.PatchDirMode = new System.Windows.Forms.RadioButton();
this.PatchDir = new System.Windows.Forms.TextBox();
this.BrowseDir = new System.Windows.Forms.Button();
this.patchGrid1 = new GitUI.PatchGrid();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@ -51,7 +54,7 @@
//
// BrowsePatch
//
this.BrowsePatch.Location = new System.Drawing.Point(364, 3);
this.BrowsePatch.Location = new System.Drawing.Point(392, 9);
this.BrowsePatch.Name = "BrowsePatch";
this.BrowsePatch.Size = new System.Drawing.Size(75, 23);
this.BrowsePatch.TabIndex = 0;
@ -59,18 +62,9 @@
this.BrowsePatch.UseVisualStyleBackColor = true;
this.BrowsePatch.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(51, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Patch file";
//
// PatchFile
//
this.PatchFile.Location = new System.Drawing.Point(77, 6);
this.PatchFile.Location = new System.Drawing.Point(105, 10);
this.PatchFile.Name = "PatchFile";
this.PatchFile.Size = new System.Drawing.Size(281, 20);
this.PatchFile.TabIndex = 2;
@ -80,7 +74,7 @@
//
this.Apply.Location = new System.Drawing.Point(3, 3);
this.Apply.Name = "Apply";
this.Apply.Size = new System.Drawing.Size(104, 23);
this.Apply.Size = new System.Drawing.Size(112, 23);
this.Apply.TabIndex = 3;
this.Apply.Text = "Apply patch";
this.Apply.UseVisualStyleBackColor = true;
@ -88,9 +82,14 @@
//
// Mergetool
//
this.Mergetool.Location = new System.Drawing.Point(3, 33);
this.Mergetool.BackColor = System.Drawing.SystemColors.ControlDark;
this.Mergetool.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.Mergetool.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.Mergetool.FlatAppearance.BorderSize = 0;
this.Mergetool.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.Mergetool.Location = new System.Drawing.Point(3, 76);
this.Mergetool.Name = "Mergetool";
this.Mergetool.Size = new System.Drawing.Size(104, 23);
this.Mergetool.Size = new System.Drawing.Size(112, 23);
this.Mergetool.TabIndex = 5;
this.Mergetool.Text = "Solve conflicts";
this.Mergetool.UseVisualStyleBackColor = true;
@ -98,9 +97,9 @@
//
// Skip
//
this.Skip.Location = new System.Drawing.Point(2, 166);
this.Skip.Location = new System.Drawing.Point(2, 209);
this.Skip.Name = "Skip";
this.Skip.Size = new System.Drawing.Size(103, 23);
this.Skip.Size = new System.Drawing.Size(112, 23);
this.Skip.TabIndex = 6;
this.Skip.Text = "Skip patch";
this.Skip.UseVisualStyleBackColor = true;
@ -108,9 +107,9 @@
//
// Abort
//
this.Abort.Location = new System.Drawing.Point(2, 195);
this.Abort.Location = new System.Drawing.Point(2, 238);
this.Abort.Name = "Abort";
this.Abort.Size = new System.Drawing.Size(104, 23);
this.Abort.Size = new System.Drawing.Size(112, 23);
this.Abort.TabIndex = 7;
this.Abort.Text = "Abort patch";
this.Abort.UseVisualStyleBackColor = true;
@ -118,9 +117,9 @@
//
// Resolved
//
this.Resolved.Location = new System.Drawing.Point(3, 137);
this.Resolved.Location = new System.Drawing.Point(3, 180);
this.Resolved.Name = "Resolved";
this.Resolved.Size = new System.Drawing.Size(103, 23);
this.Resolved.Size = new System.Drawing.Size(112, 23);
this.Resolved.TabIndex = 8;
this.Resolved.Text = "Conflicts resolved";
this.Resolved.UseVisualStyleBackColor = true;
@ -128,22 +127,14 @@
//
// AddFiles
//
this.AddFiles.Location = new System.Drawing.Point(3, 88);
this.AddFiles.Location = new System.Drawing.Point(3, 131);
this.AddFiles.Name = "AddFiles";
this.AddFiles.Size = new System.Drawing.Size(102, 23);
this.AddFiles.Size = new System.Drawing.Size(112, 23);
this.AddFiles.TabIndex = 9;
this.AddFiles.Text = "Add files";
this.AddFiles.UseVisualStyleBackColor = true;
this.AddFiles.Click += new System.EventHandler(this.AddFiles_Click);
//
// patchGrid1
//
this.patchGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.patchGrid1.Location = new System.Drawing.Point(0, 0);
this.patchGrid1.Name = "patchGrid1";
this.patchGrid1.Size = new System.Drawing.Size(646, 355);
this.patchGrid1.TabIndex = 10;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
@ -164,7 +155,7 @@
this.splitContainer1.Panel2.Controls.Add(this.Resolved);
this.splitContainer1.Panel2.Controls.Add(this.Abort);
this.splitContainer1.Size = new System.Drawing.Size(764, 391);
this.splitContainer1.SplitterDistance = 646;
this.splitContainer1.SplitterDistance = 642;
this.splitContainer1.TabIndex = 11;
//
// splitContainer2
@ -177,17 +168,72 @@
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.PatchDir);
this.splitContainer2.Panel1.Controls.Add(this.BrowseDir);
this.splitContainer2.Panel1.Controls.Add(this.PatchDirMode);
this.splitContainer2.Panel1.Controls.Add(this.PatchFileMode);
this.splitContainer2.Panel1.Controls.Add(this.PatchFile);
this.splitContainer2.Panel1.Controls.Add(this.BrowsePatch);
this.splitContainer2.Panel1.Controls.Add(this.label1);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.patchGrid1);
this.splitContainer2.Size = new System.Drawing.Size(646, 391);
this.splitContainer2.SplitterDistance = 32;
this.splitContainer2.Size = new System.Drawing.Size(642, 391);
this.splitContainer2.SplitterDistance = 72;
this.splitContainer2.TabIndex = 0;
//
// PatchFileMode
//
this.PatchFileMode.AutoSize = true;
this.PatchFileMode.Checked = true;
this.PatchFileMode.Location = new System.Drawing.Point(13, 11);
this.PatchFileMode.Name = "PatchFileMode";
this.PatchFileMode.Size = new System.Drawing.Size(69, 17);
this.PatchFileMode.TabIndex = 3;
this.PatchFileMode.TabStop = true;
this.PatchFileMode.Text = "Patch file";
this.PatchFileMode.UseVisualStyleBackColor = true;
this.PatchFileMode.CheckedChanged += new System.EventHandler(this.PatchFileMode_CheckedChanged);
//
// PatchDirMode
//
this.PatchDirMode.AutoSize = true;
this.PatchDirMode.Location = new System.Drawing.Point(13, 36);
this.PatchDirMode.Name = "PatchDirMode";
this.PatchDirMode.Size = new System.Drawing.Size(67, 17);
this.PatchDirMode.TabIndex = 4;
this.PatchDirMode.TabStop = true;
this.PatchDirMode.Text = "Patch dir";
this.PatchDirMode.UseVisualStyleBackColor = true;
this.PatchDirMode.CheckedChanged += new System.EventHandler(this.PatchDirMode_CheckedChanged);
//
// PatchDir
//
this.PatchDir.Enabled = false;
this.PatchDir.Location = new System.Drawing.Point(105, 36);
this.PatchDir.Name = "PatchDir";
this.PatchDir.Size = new System.Drawing.Size(281, 20);
this.PatchDir.TabIndex = 6;
//
// BrowseDir
//
this.BrowseDir.Enabled = false;
this.BrowseDir.Location = new System.Drawing.Point(392, 35);
this.BrowseDir.Name = "BrowseDir";
this.BrowseDir.Size = new System.Drawing.Size(75, 23);
this.BrowseDir.TabIndex = 5;
this.BrowseDir.Text = "Browse";
this.BrowseDir.UseVisualStyleBackColor = true;
this.BrowseDir.Click += new System.EventHandler(this.BrowseDir_Click);
//
// patchGrid1
//
this.patchGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.patchGrid1.Location = new System.Drawing.Point(0, 0);
this.patchGrid1.Name = "patchGrid1";
this.patchGrid1.Size = new System.Drawing.Size(642, 315);
this.patchGrid1.TabIndex = 10;
//
// MergePatch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -214,7 +260,6 @@
#endregion
private System.Windows.Forms.Button BrowsePatch;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox PatchFile;
private System.Windows.Forms.Button Apply;
private System.Windows.Forms.Button Mergetool;
@ -225,5 +270,9 @@
private PatchGrid patchGrid1;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.TextBox PatchDir;
private System.Windows.Forms.Button BrowseDir;
private System.Windows.Forms.RadioButton PatchDirMode;
private System.Windows.Forms.RadioButton PatchFileMode;
}
}

81
GitUI/MergePatch.cs

@ -25,29 +25,54 @@ namespace GitUI
private void EnableButtons()
{
if (GitCommands.GitCommands.InTheMiddleOfRebase())
if (GitCommands.GitCommands.InTheMiddleOfPatch())
{
BrowsePatch.Enabled = false;
Apply.Enabled = false;
PatchFile.ReadOnly = true;
AddFiles.Enabled = true;
Resolved.Enabled = true;
Mergetool.Enabled = true;
Resolved.Enabled = !GitCommands.GitCommands.InTheMiddleOfConflictedMerge();
Mergetool.Enabled = GitCommands.GitCommands.InTheMiddleOfConflictedMerge();
Skip.Enabled = true;
Abort.Enabled = true;
PatchFile.Enabled = false;
PatchFile.ReadOnly = false;
BrowsePatch.Enabled = false;
PatchDir.Enabled = false;
PatchDir.ReadOnly = false;
BrowseDir.Enabled = false;
}
else
{
BrowsePatch.Enabled = true;
PatchFile.Enabled = PatchFileMode.Checked;
PatchFile.ReadOnly = !PatchFileMode.Checked;
BrowsePatch.Enabled = PatchFileMode.Checked;
PatchDir.Enabled = PatchDirMode.Checked;
PatchDir.ReadOnly = !PatchDirMode.Checked;
BrowseDir.Enabled = PatchDirMode.Checked;
Apply.Enabled = true;
PatchFile.ReadOnly = false;
AddFiles.Enabled = false;
Resolved.Enabled = false;
Mergetool.Enabled = false;
Skip.Enabled = false;
Abort.Enabled = false;
}
patchGrid1.Initialize();
Resolved.Text = "Conflicts resolved";
Mergetool.Text = "Solve conflicts";
if (GitCommands.GitCommands.InTheMiddleOfConflictedMerge())
{
Mergetool.Text = ">Solve conflicts<";
}
else
if (GitCommands.GitCommands.InTheMiddleOfPatch())
{
Resolved.Text = ">Conflicts resolved<";
}
}
@ -75,26 +100,24 @@ namespace GitUI
private void Apply_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(PatchFile.Text))
if (string.IsNullOrEmpty(PatchFile.Text) && string.IsNullOrEmpty(PatchDir.Text))
{
MessageBox.Show("Please select a patch file");
MessageBox.Show("Please select a patch to apply");
return;
}
new FormProcess(GitCommands.GitCommands.PatchCmd(PatchFile.Text));
if (PatchFileMode.Checked)
new FormProcess(GitCommands.GitCommands.PatchCmd(PatchFile.Text));
else
new FormProcess(GitCommands.GitCommands.PatchCmd(PatchDir.Text + "\\*.patch"));
EnableButtons();
}
private void Mergetool_Click(object sender, EventArgs e)
{
GitCommands.GitCommands.RunRealCmd(GitCommands.Settings.GitDir + "git.cmd", "mergetool");
if (MessageBox.Show("Resolved all conflicts? Run resolved?", "Conflicts solved", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
new FormProcess(GitCommands.GitCommands.ResolvedCmd());
EnableButtons();
}
new FormResolveConflicts().ShowDialog();
EnableButtons();
}
private void Skip_Click(object sender, EventArgs e)
@ -129,13 +152,27 @@ namespace GitUI
private void MergePatch_FormClosing(object sender, FormClosingEventArgs e)
{
if (GitCommands.GitCommands.InTheMiddleOfRebase())
}
private void BrowseDir_Click(object sender, EventArgs e)
{
FolderBrowserDialog browseDialog = new FolderBrowserDialog();
if (browseDialog.ShowDialog() == DialogResult.OK)
{
if (MessageBox.Show("You are in the middle of a patch apply. You need to resolve, skip or abort this patch.\nAre you sure to exit now?", "Exit", MessageBoxButtons.YesNo) == DialogResult.No)
{
e.Cancel = true;
}
PatchDir.Text = browseDialog.SelectedPath;
}
}
private void PatchFileMode_CheckedChanged(object sender, EventArgs e)
{
EnableButtons();
}
private void PatchDirMode_CheckedChanged(object sender, EventArgs e)
{
}
}
}

2
SimpleExt/ReleaseMinDependency/mt.dep

@ -1 +1 @@
Manifest resource last updated at 14:42:20,71 on zo 25-01-2009
Manifest resource last updated at 21:44:37,30 on di 27-01-2009

BIN
SimpleExt/ReleaseMinDependency/vc90.idb

2
SimpleExt/SimpleExt.h

@ -4,7 +4,7 @@
/* File created by MIDL compiler version 7.00.0500 */
/* at Sun Jan 25 14:42:16 2009
/* at Tue Jan 27 21:41:46 2009
*/
/* Compiler settings for .\SimpleExt.idl:
Oicf, W1, Zp8, env=Win32 (32b run)

Loading…
Cancel
Save