
20 changed files with 3958 additions and 1606 deletions
-
105GitCommands/GitCommands/Git/GitCommands.cs
-
42GitShellEx/FileHashShellExt.cs
-
3GitUI/AboutBox.Designer.cs
-
5GitUI/AboutBox.cs
-
2GitUI/ApplyPatch.cs
-
169GitUI/Browse.Designer.cs
-
56GitUI/Browse.cs
-
191GitUI/Commit.Designer.cs
-
11GitUI/Commit.cs
-
148GitUI/FormPull.Designer.cs
-
82GitUI/FormPull.cs
-
1583GitUI/FormPull.resx
-
107GitUI/FormPush.Designer.cs
-
38GitUI/FormPush.cs
-
120GitUI/FormPush.resx
-
18GitUI/GitUI.csproj
-
2GitUI/MergePatch.Designer.cs
-
8GitUI/MergePatch.cs
-
1463GitUI/MergePatch.resx
-
1411Setup/Setup.vdproj
@ -0,0 +1,148 @@ |
|||
namespace GitUI |
|||
{ |
|||
partial class FormPull |
|||
{ |
|||
/// <summary>
|
|||
/// Required designer variable.
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// Clean up any resources being used.
|
|||
/// </summary>
|
|||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form Designer generated code
|
|||
|
|||
/// <summary>
|
|||
/// Required method for Designer support - do not modify
|
|||
/// the contents of this method with the code editor.
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormPull)); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.PullSource = new System.Windows.Forms.TextBox(); |
|||
this.BrowseSource = new System.Windows.Forms.Button(); |
|||
this.Branches = new System.Windows.Forms.ComboBox(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.Pull = new System.Windows.Forms.Button(); |
|||
this.Mergetool = new System.Windows.Forms.Button(); |
|||
this.Output = new System.Windows.Forms.RichTextBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Location = new System.Drawing.Point(13, 13); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(41, 13); |
|||
this.label1.TabIndex = 0; |
|||
this.label1.Text = "Source"; |
|||
//
|
|||
// PullSource
|
|||
//
|
|||
this.PullSource.Location = new System.Drawing.Point(105, 10); |
|||
this.PullSource.Name = "PullSource"; |
|||
this.PullSource.Size = new System.Drawing.Size(345, 20); |
|||
this.PullSource.TabIndex = 3; |
|||
this.PullSource.TextChanged += new System.EventHandler(this.PullSource_TextChanged); |
|||
//
|
|||
// BrowseSource
|
|||
//
|
|||
this.BrowseSource.Location = new System.Drawing.Point(457, 7); |
|||
this.BrowseSource.Name = "BrowseSource"; |
|||
this.BrowseSource.Size = new System.Drawing.Size(104, 23); |
|||
this.BrowseSource.TabIndex = 4; |
|||
this.BrowseSource.Text = "Browse"; |
|||
this.BrowseSource.UseVisualStyleBackColor = true; |
|||
this.BrowseSource.Click += new System.EventHandler(this.BrowseSource_Click); |
|||
//
|
|||
// Branches
|
|||
//
|
|||
this.Branches.FormattingEnabled = true; |
|||
this.Branches.Location = new System.Drawing.Point(105, 37); |
|||
this.Branches.Name = "Branches"; |
|||
this.Branches.Size = new System.Drawing.Size(345, 21); |
|||
this.Branches.TabIndex = 5; |
|||
this.Branches.DropDown += new System.EventHandler(this.Branches_DropDown); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.AutoSize = true; |
|||
this.label2.Location = new System.Drawing.Point(13, 40); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(80, 13); |
|||
this.label2.TabIndex = 6; |
|||
this.label2.Text = "Remote branch"; |
|||
this.label2.Click += new System.EventHandler(this.label2_Click); |
|||
//
|
|||
// Pull
|
|||
//
|
|||
this.Pull.Location = new System.Drawing.Point(459, 35); |
|||
this.Pull.Name = "Pull"; |
|||
this.Pull.Size = new System.Drawing.Size(102, 23); |
|||
this.Pull.TabIndex = 7; |
|||
this.Pull.Text = "Pull"; |
|||
this.Pull.UseVisualStyleBackColor = true; |
|||
this.Pull.Click += new System.EventHandler(this.Pull_Click); |
|||
//
|
|||
// Mergetool
|
|||
//
|
|||
this.Mergetool.Location = new System.Drawing.Point(457, 73); |
|||
this.Mergetool.Name = "Mergetool"; |
|||
this.Mergetool.Size = new System.Drawing.Size(104, 23); |
|||
this.Mergetool.TabIndex = 11; |
|||
this.Mergetool.Text = "Solve conflicts"; |
|||
this.Mergetool.UseVisualStyleBackColor = true; |
|||
this.Mergetool.Click += new System.EventHandler(this.Mergetool_Click); |
|||
//
|
|||
// Output
|
|||
//
|
|||
this.Output.Location = new System.Drawing.Point(8, 73); |
|||
this.Output.Name = "Output"; |
|||
this.Output.Size = new System.Drawing.Size(442, 185); |
|||
this.Output.TabIndex = 10; |
|||
this.Output.Text = ""; |
|||
//
|
|||
// FormPull
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(568, 274); |
|||
this.Controls.Add(this.Mergetool); |
|||
this.Controls.Add(this.Output); |
|||
this.Controls.Add(this.Pull); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.Branches); |
|||
this.Controls.Add(this.BrowseSource); |
|||
this.Controls.Add(this.PullSource); |
|||
this.Controls.Add(this.label1); |
|||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); |
|||
this.Name = "FormPull"; |
|||
this.Text = "Pull"; |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox PullSource; |
|||
private System.Windows.Forms.Button BrowseSource; |
|||
private System.Windows.Forms.ComboBox Branches; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.Button Pull; |
|||
private System.Windows.Forms.Button Mergetool; |
|||
private System.Windows.Forms.RichTextBox Output; |
|||
} |
|||
} |
@ -0,0 +1,82 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace GitUI |
|||
{ |
|||
public partial class FormPull : Form |
|||
{ |
|||
public FormPull() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void BrowseSource_Click(object sender, EventArgs e) |
|||
{ |
|||
FolderBrowserDialog dialog = new FolderBrowserDialog(); |
|||
if (dialog.ShowDialog() == DialogResult.OK) |
|||
PullSource.Text = dialog.SelectedPath; |
|||
} |
|||
|
|||
private void label2_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void Mergetool_Click(object sender, EventArgs e) |
|||
{ |
|||
GitCommands.GitCommands.RunRealCmd(GitCommands.Settings.GitDir + "git.exe", "mergetool --tool=kdiff3"); |
|||
|
|||
if (MessageBox.Show("Resolved all conflicts? Commit?", "Conflicts solved", MessageBoxButtons.YesNo) == DialogResult.Yes) |
|||
{ |
|||
//Output.Text += "\n";
|
|||
FormCommit form = new FormCommit(); |
|||
form.ShowDialog(); |
|||
} |
|||
} |
|||
|
|||
private void PullSource_TextChanged(object sender, EventArgs e) |
|||
{ |
|||
Branches.DataSource = null; |
|||
} |
|||
|
|||
private void Branches_DropDown(object sender, EventArgs e) |
|||
{ |
|||
if (string.IsNullOrEmpty(PullSource.Text)) |
|||
{ |
|||
Branches.DataSource = null; |
|||
return; |
|||
} |
|||
|
|||
string realWorkingDir = GitCommands.Settings.WorkingDir; |
|||
|
|||
try |
|||
{ |
|||
GitCommands.Settings.WorkingDir = PullSource.Text; |
|||
Branches.DisplayMember = "Name"; |
|||
Branches.DataSource = GitCommands.GitCommands.GetHeads(false); |
|||
} |
|||
finally |
|||
{ |
|||
GitCommands.Settings.WorkingDir = realWorkingDir; |
|||
} |
|||
} |
|||
|
|||
private void Pull_Click(object sender, EventArgs e) |
|||
{ |
|||
if (string.IsNullOrEmpty(PullSource.Text)) |
|||
{ |
|||
MessageBox.Show("Please select a source directory"); |
|||
return; |
|||
} |
|||
|
|||
Output.Text = GitCommands.GitCommands.Pull(PullSource.Text, Branches.SelectedText); |
|||
} |
|||
|
|||
} |
|||
} |
1583
GitUI/FormPull.resx
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,107 @@ |
|||
namespace GitUI |
|||
{ |
|||
partial class FormPush |
|||
{ |
|||
/// <summary>
|
|||
/// Required designer variable.
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// Clean up any resources being used.
|
|||
/// </summary>
|
|||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form Designer generated code
|
|||
|
|||
/// <summary>
|
|||
/// Required method for Designer support - do not modify
|
|||
/// the contents of this method with the code editor.
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.Output = new System.Windows.Forms.RichTextBox(); |
|||
this.BrowseSource = new System.Windows.Forms.Button(); |
|||
this.PushDestination = new System.Windows.Forms.TextBox(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.Push = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// Output
|
|||
//
|
|||
this.Output.Location = new System.Drawing.Point(22, 46); |
|||
this.Output.Name = "Output"; |
|||
this.Output.Size = new System.Drawing.Size(562, 222); |
|||
this.Output.TabIndex = 14; |
|||
this.Output.Text = ""; |
|||
//
|
|||
// BrowseSource
|
|||
//
|
|||
this.BrowseSource.Location = new System.Drawing.Point(372, 17); |
|||
this.BrowseSource.Name = "BrowseSource"; |
|||
this.BrowseSource.Size = new System.Drawing.Size(104, 23); |
|||
this.BrowseSource.TabIndex = 13; |
|||
this.BrowseSource.Text = "Browse"; |
|||
this.BrowseSource.UseVisualStyleBackColor = true; |
|||
this.BrowseSource.Click += new System.EventHandler(this.BrowseSource_Click); |
|||
//
|
|||
// PushDestination
|
|||
//
|
|||
this.PushDestination.Location = new System.Drawing.Point(119, 20); |
|||
this.PushDestination.Name = "PushDestination"; |
|||
this.PushDestination.Size = new System.Drawing.Size(247, 20); |
|||
this.PushDestination.TabIndex = 12; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Location = new System.Drawing.Point(27, 23); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(60, 13); |
|||
this.label1.TabIndex = 11; |
|||
this.label1.Text = "Destination"; |
|||
//
|
|||
// Push
|
|||
//
|
|||
this.Push.Location = new System.Drawing.Point(482, 17); |
|||
this.Push.Name = "Push"; |
|||
this.Push.Size = new System.Drawing.Size(104, 23); |
|||
this.Push.TabIndex = 15; |
|||
this.Push.Text = "Push"; |
|||
this.Push.UseVisualStyleBackColor = true; |
|||
this.Push.Click += new System.EventHandler(this.Push_Click); |
|||
//
|
|||
// FormPush
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(596, 285); |
|||
this.Controls.Add(this.Push); |
|||
this.Controls.Add(this.Output); |
|||
this.Controls.Add(this.BrowseSource); |
|||
this.Controls.Add(this.PushDestination); |
|||
this.Controls.Add(this.label1); |
|||
this.Name = "FormPush"; |
|||
this.Text = "FormPush"; |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.RichTextBox Output; |
|||
private System.Windows.Forms.Button BrowseSource; |
|||
private System.Windows.Forms.TextBox PushDestination; |
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.Button Push; |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace GitUI |
|||
{ |
|||
public partial class FormPush : Form |
|||
{ |
|||
public FormPush() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void BrowseSource_Click(object sender, EventArgs e) |
|||
{ |
|||
FolderBrowserDialog dialog = new FolderBrowserDialog(); |
|||
if (dialog.ShowDialog() == DialogResult.OK) |
|||
PushDestination.Text = dialog.SelectedPath; |
|||
|
|||
} |
|||
|
|||
private void Push_Click(object sender, EventArgs e) |
|||
{ |
|||
if (string.IsNullOrEmpty(PushDestination.Text)) |
|||
{ |
|||
MessageBox.Show("Please select a destination directory"); |
|||
return; |
|||
} |
|||
|
|||
Output.Text = GitCommands.GitCommands.Push(PushDestination.Text); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
1463
GitUI/MergePatch.resx
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1411
Setup/Setup.vdproj
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue