ok, this is way lame, but it's just a simple poc =P this is a winform app that will launch svn log and all of the files you drop onto it or sendto it and put them all in one window. i also put a little bit of basic logic to remove blank lines and the seperators from between the log entries. the only purpose of this is if you have to regularly get these comments back for about 10 or 20 files, using multiple threads will be way faster. hopefully this will help someone else who needs a basic example of a multi-threaded command line app call =P of course, you can substitude svn log for any command line you wish, or convert it to a command line and feed it a list file. pretty much, whatever. note that this is for a winform app with a form named form1 and a richtextbox named richtextbox1. very unfancy =P

here's the code:

using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;

namespace ForkWannaBe
{
public partial class Form1 : Form
{
private const string c = "svn log ";

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
richTextBox1.AppendText("WORKING...\n\n");
string[] args = Environment.GetCommandLineArgs();
// note the 1, 0 is the exe path
for (int i = 1; i != args.Length; ++i)
ThreadPool.QueueUserWorkItem(new WaitCallback(go), args[i]);
}

private void go(object o)
{
string f = (string)o;
string t = Path.GetTempFileName();
string tt = t + ".cmd";
StringBuilder fc = new StringBuilder();
using(StreamWriter sw = new StreamWriter(tt))
{
sw.AutoFlush = true;
sw.Write("@" + c + "\"" + f + "\"" + " >> " + "\"" + t + "\"");
sw.Close();
}
ProcessStartInfo si = new ProcessStartInfo(tt);
si.UseShellExecute = false;
si.RedirectStandardOutput = true;
si.CreateNoWindow = true;

using (Process p = new Process())
{
p.StartInfo = si;
p.Start();
while (!p.HasExited)
Thread.Sleep(500);

using ( StreamReader sr = new StreamReader(t))
{
sr.ReadLine(); // skip first line
while (!sr.EndOfStream)
{
string line = sr.ReadLine();
if (!line.Length.Equals(0) & !line.StartsWith("----------"))
fc.AppendLine(line);
}
}
}
richTextBox1.AppendText(
string.Format("begin - {0}\n{1}end - {2}\n"
, f, fc, f));
File.Delete(t);
File.Delete(tt);
}
}
}