Changes in / [1:3]


Ignore:
Location:
/trunk
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • /trunk/SvnChangeList.sln

    r1 r3  
    22Microsoft Visual Studio Solution File, Format Version 9.00
    33# Visual C# Express 2005
    4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangeList", "SvnChangeList\SvnChangeList.csproj", "{04CB072D-8767-45B9-9B7D-43A45E687706}"
     4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangeListGui", "SvnChangeList\SvnChangeListGui.csproj", "{04CB072D-8767-45B9-9B7D-43A45E687706}"
    55EndProject
    6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangiListLib", "SvnChangiListLib\SvnChangiListLib.csproj", "{223A3748-67A2-4DF7-8B22-B1E2EA4C1616}"
     6Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SvnChangeListLib", "SvnChangiListLib\SvnChangeListLib.csproj", "{223A3748-67A2-4DF7-8B22-B1E2EA4C1616}"
    77EndProject
    88Global
  • /trunk/SvnChangeList/MainForm.Designer.cs

    r1 r3  
    1 namespace SvnChangeList
     1namespace SvnChangeList.Gui
    22{
    33    partial class MainForm
     
    2929        private void InitializeComponent()
    3030        {
    31             this.textBox1 = new System.Windows.Forms.TextBox();
     31            this.RepoPathText = new System.Windows.Forms.TextBox();
    3232            this.label1 = new System.Windows.Forms.Label();
    3333            this.FromGroupBox = new System.Windows.Forms.GroupBox();
     34            this.textBox2 = new System.Windows.Forms.TextBox();
     35            this.FromRevRadio = new System.Windows.Forms.RadioButton();
    3436            this.FromHeadRadio = new System.Windows.Forms.RadioButton();
    35             this.FromRevRadio = new System.Windows.Forms.RadioButton();
    36             this.textBox2 = new System.Windows.Forms.TextBox();
    3737            this.ToGroupBox = new System.Windows.Forms.GroupBox();
    3838            this.textBox3 = new System.Windows.Forms.TextBox();
     
    4747            this.SuspendLayout();
    4848            //
    49             // textBox1
    50             //
    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;
    5555            //
    5656            // label1
     
    7575            this.FromGroupBox.Text = "&From";
    7676            //
     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            //
    7795            // FromHeadRadio
    7896            //
     
    85103            this.FromHeadRadio.Text = "&HEAD";
    86104            this.FromHeadRadio.UseVisualStyleBackColor = true;
    87             //
    88             // FromRevRadio
    89             //
    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             // textBox2
    100             //
    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;
    105105            //
    106106            // ToGroupBox
     
    153153            this.MakeListButton.Text = "Make &List";
    154154            this.MakeListButton.UseVisualStyleBackColor = true;
     155            this.MakeListButton.Click += new System.EventHandler(this.MakeListButton_Click);
    155156            //
    156157            // listView1
     
    164165            this.listView1.Location = new System.Drawing.Point(14, 145);
    165166            this.listView1.Name = "listView1";
    166             this.listView1.Size = new System.Drawing.Size(410, 270);
     167            this.listView1.Size = new System.Drawing.Size(417, 387);
    167168            this.listView1.TabIndex = 5;
    168169            this.listView1.UseCompatibleStateImageBehavior = false;
     
    181182            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
    182183            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    183             this.ClientSize = new System.Drawing.Size(433, 427);
     184            this.ClientSize = new System.Drawing.Size(440, 544);
    184185            this.Controls.Add(this.listView1);
    185186            this.Controls.Add(this.MakeListButton);
     
    187188            this.Controls.Add(this.FromGroupBox);
    188189            this.Controls.Add(this.label1);
    189             this.Controls.Add(this.textBox1);
     190            this.Controls.Add(this.RepoPathText);
    190191            this.Name = "MainForm";
    191192            this.Text = "SvnChangeList";
     
    201202        #endregion
    202203
    203         private System.Windows.Forms.TextBox textBox1;
     204        private System.Windows.Forms.TextBox RepoPathText;
    204205        private System.Windows.Forms.Label label1;
    205206        private System.Windows.Forms.GroupBox FromGroupBox;
  • /trunk/SvnChangeList/MainForm.cs

    r1 r3  
    55using System.Drawing;
    66using System.Text;
     7using System.Text.RegularExpressions;
    78using System.Windows.Forms;
     9using System.Diagnostics;
     10using System.Xml;
     11using SvnChangeList.Lib;
    812
    9 namespace SvnChangeList
     13namespace SvnChangeList.Gui
    1014{
    1115    public partial class MainForm : Form
     
    1519            InitializeComponent();
    1620        }
     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        }
    1766    }
    1867}
  • /trunk/SvnChangeList/Program.cs

    r1 r3  
    33using System.Windows.Forms;
    44
    5 namespace SvnChangeList
     5namespace SvnChangeList.Gui
    66{
    77    static class Program
  • /trunk/SvnChangiListLib/SvnChangeListLib.cs

    r1 r3  
    22using System.Collections.Generic;
    33using System.Text;
     4using System.Diagnostics;
     5using System.IO;
     6using System.Xml;
    47
    5 namespace SvnChangiListLib
     8namespace SvnChangeList.Lib
    69{
    710    public class SvnChangeListLib
    811    {
     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        }
    940    }
    1041}
Note: See TracChangeset for help on using the changeset viewer.