Skip to content

Instantly share code, notes, and snippets.

@takeshik
Created March 3, 2010 15:47
Show Gist options
  • Save takeshik/320696 to your computer and use it in GitHub Desktop.
Save takeshik/320696 to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Xml.Linq;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("\n---- 最近の修正 ---- \n{0}", String.Join(Environment.NewLine, XDocument.Parse(
Process.Start(new ProcessStartInfo("svn", "log --xml -v http://svnrepo/ -l 100")
{
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
StandardOutputEncoding = Encoding.UTF8,
}).StandardOutput.ReadToEnd()
).Descendants("logentry").Select(xe => String.Format("■r{0} {1}",
xe.Attribute("revision").Value,
xe.Element("msg").Value.Replace("\n", "\n ")
)).ToArray()) + "\n"
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment