- Location:
- /trunk
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
/trunk/SvnChangeList.sln
r1 r3 2 2 Microsoft Visual Studio Solution File, Format Version 9.00 3 3 # Visual C# Express 2005 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangeList ", "SvnChangeList\SvnChangeList.csproj", "{04CB072D-8767-45B9-9B7D-43A45E687706}"4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangeListGui", "SvnChangeList\SvnChangeListGui.csproj", "{04CB072D-8767-45B9-9B7D-43A45E687706}" 5 5 EndProject 6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChang iListLib", "SvnChangiListLib\SvnChangiListLib.csproj", "{223A3748-67A2-4DF7-8B22-B1E2EA4C1616}"6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangeListLib", "SvnChangiListLib\SvnChangeListLib.csproj", "{223A3748-67A2-4DF7-8B22-B1E2EA4C1616}" 7 7 EndProject 8 8 Global -
/trunk/SvnChangeList/MainForm.Designer.cs
r1 r3 1 namespace SvnChangeList 1 namespace SvnChangeList.Gui 2 2 { 3 3 partial class MainForm … … 29 29 private void InitializeComponent() 30 30 { 31 this. textBox1= new System.Windows.Forms.TextBox();31 this.RepoPathText = new System.Windows.Forms.TextBox(); 32 32 this.label1 = new System.Windows.Forms.Label(); 33 33 this.FromGroupBox = new System.Windows.Forms.GroupBox(); 34 this.textBox2 = new System.Windows.Forms.TextBox(); 35 this.FromRevRadio = new System.Windows.Forms.RadioButton(); 34 36 this.FromHeadRadio = new System.Windows.Forms.RadioButton(); 35 this.FromRevRadio = new System.Windows.Forms.RadioButton();36 this.textBox2 = new System.Windows.Forms.TextBox();37 37 this.ToGroupBox = new System.Windows.Forms.GroupBox(); 38 38 this.textBox3 = new System.Windows.Forms.TextBox(); … … 47 47 this.SuspendLayout(); 48 48 // 49 // textBox150 // 51 this. textBox1.Location = new System.Drawing.Point(105, 12);52 this. textBox1.Name = "textBox1";53 this. textBox1.Size = new System.Drawing.Size(319, 19);54 this. textBox1.TabIndex = 0;49 // RepoPathText 50 // 51 this.RepoPathText.Location = new System.Drawing.Point(105, 12); 52 this.RepoPathText.Name = "RepoPathText"; 53 this.RepoPathText.Size = new System.Drawing.Size(319, 19); 54 this.RepoPathText.TabIndex = 0; 55 55 // 56 56 // label1 … … 75 75 this.FromGroupBox.Text = "&From"; 76 76 // 77 // textBox2 78 // 79 this.textBox2.Location = new System.Drawing.Point(80, 41); 80 this.textBox2.Name = "textBox2"; 81 this.textBox2.Size = new System.Drawing.Size(114, 19); 82 this.textBox2.TabIndex = 2; 83 // 84 // FromRevRadio 85 // 86 this.FromRevRadio.AutoSize = true; 87 this.FromRevRadio.Location = new System.Drawing.Point(7, 42); 88 this.FromRevRadio.Name = "FromRevRadio"; 89 this.FromRevRadio.Size = new System.Drawing.Size(67, 16); 90 this.FromRevRadio.TabIndex = 1; 91 this.FromRevRadio.TabStop = true; 92 this.FromRevRadio.Text = "&Revision"; 93 this.FromRevRadio.UseVisualStyleBackColor = true; 94 // 77 95 // FromHeadRadio 78 96 // … … 85 103 this.FromHeadRadio.Text = "&HEAD"; 86 104 this.FromHeadRadio.UseVisualStyleBackColor = true; 87 //88 // FromRevRadio89 //90 this.FromRevRadio.AutoSize = true;91 this.FromRevRadio.Location = new System.Drawing.Point(7, 42);92 this.FromRevRadio.Name = "FromRevRadio";93 this.FromRevRadio.Size = new System.Drawing.Size(67, 16);94 this.FromRevRadio.TabIndex = 1;95 this.FromRevRadio.TabStop = true;96 this.FromRevRadio.Text = "&Revision";97 this.FromRevRadio.UseVisualStyleBackColor = true;98 //99 // textBox2100 //101 this.textBox2.Location = new System.Drawing.Point(80, 41);102 this.textBox2.Name = "textBox2";103 this.textBox2.Size = new System.Drawing.Size(114, 19);104 this.textBox2.TabIndex = 2;105 105 // 106 106 // ToGroupBox … … 153 153 this.MakeListButton.Text = "Make &List"; 154 154 this.MakeListButton.UseVisualStyleBackColor = true; 155 this.MakeListButton.Click += new System.EventHandler(this.MakeListButton_Click); 155 156 // 156 157 // listView1 … … 164 165 this.listView1.Location = new System.Drawing.Point(14, 145); 165 166 this.listView1.Name = "listView1"; 166 this.listView1.Size = new System.Drawing.Size(41 0, 270);167 this.listView1.Size = new System.Drawing.Size(417, 387); 167 168 this.listView1.TabIndex = 5; 168 169 this.listView1.UseCompatibleStateImageBehavior = false; … … 181 182 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 182 183 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 183 this.ClientSize = new System.Drawing.Size(4 33, 427);184 this.ClientSize = new System.Drawing.Size(440, 544); 184 185 this.Controls.Add(this.listView1); 185 186 this.Controls.Add(this.MakeListButton); … … 187 188 this.Controls.Add(this.FromGroupBox); 188 189 this.Controls.Add(this.label1); 189 this.Controls.Add(this. textBox1);190 this.Controls.Add(this.RepoPathText); 190 191 this.Name = "MainForm"; 191 192 this.Text = "SvnChangeList"; … … 201 202 #endregion 202 203 203 private System.Windows.Forms.TextBox textBox1;204 private System.Windows.Forms.TextBox RepoPathText; 204 205 private System.Windows.Forms.Label label1; 205 206 private System.Windows.Forms.GroupBox FromGroupBox; -
/trunk/SvnChangeList/MainForm.cs
r1 r3 5 5 using System.Drawing; 6 6 using System.Text; 7 using System.Text.RegularExpressions; 7 8 using System.Windows.Forms; 9 using System.Diagnostics; 10 using System.Xml; 11 using SvnChangeList.Lib; 8 12 9 namespace SvnChangeList 13 namespace SvnChangeList.Gui 10 14 { 11 15 public partial class MainForm : Form … … 15 19 InitializeComponent(); 16 20 } 21 22 private void MakeListButton_Click(object sender, EventArgs e) 23 { 24 MakeLogList(); 25 } 26 27 private void MakeLogList() 28 { 29 XmlDocument dom = SvnChangeListLib.GetXmlLog(this.RepoPathText.Text); 30 if (dom == null) 31 { 32 MessageBox.Show("OÌæ¾É¸sµÜµ½"); 33 } 34 else 35 { 36 try 37 { 38 List<string> pathlist = new List<string>(dom.GetElementsByTagName("paths").Count); 39 40 foreach (XmlElement logentry in dom.DocumentElement.ChildNodes) 41 { 42 int rev = Convert.ToInt32(logentry.GetAttribute("revision")); 43 foreach (XmlElement path in logentry.GetElementsByTagName("path")) 44 { 45 ListViewItem item = new ListViewItem(); 46 item.Text = path.GetAttribute("action"); 47 item.SubItems.Add(path.InnerText); 48 listView1.Items.Add(item); 49 } 50 } 51 } 52 catch (XmlException xmlex) 53 { 54 MessageBox.Show(xmlex.Message); 55 } 56 catch (FormatException fex) 57 { 58 MessageBox.Show(fex.Message); 59 } 60 catch (OverflowException oex) 61 { 62 MessageBox.Show(oex.Message); 63 } 64 } 65 } 17 66 } 18 67 } -
/trunk/SvnChangeList/Program.cs
r1 r3 3 3 using System.Windows.Forms; 4 4 5 namespace SvnChangeList 5 namespace SvnChangeList.Gui 6 6 { 7 7 static class Program -
/trunk/SvnChangiListLib/SvnChangeListLib.cs
r1 r3 2 2 using System.Collections.Generic; 3 3 using System.Text; 4 using System.Diagnostics; 5 using System.IO; 6 using System.Xml; 4 7 5 namespace SvnChang iListLib8 namespace SvnChangeList.Lib 6 9 { 7 10 public class SvnChangeListLib 8 11 { 12 private static string SvnCommand(string path) 13 { 14 ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files\Subversion\Bin\svn.exe", "log -v --xml " + path); 15 info.UseShellExecute = false; 16 info.RedirectStandardOutput = true; 17 18 using (Process p = Process.Start(info)) 19 using (StreamReader r = new StreamReader(p.StandardOutput.BaseStream, Encoding.UTF8)) 20 { 21 return r.ReadToEnd(); 22 } 23 } 24 25 public static XmlDocument GetXmlLog(string wc_path) 26 { 27 XmlDocument dom = new XmlDocument(); 28 string log = SvnCommand(wc_path); 29 30 try 31 { 32 dom.LoadXml(log); 33 } 34 catch (Exception ex) 35 { 36 dom = null; 37 } 38 return dom; 39 } 9 40 } 10 41 }
Note: See TracChangeset
for help on using the changeset viewer.