Skip to content

Instantly share code, notes, and snippets.

@leppie
Created September 8, 2012 06:52
Show Gist options
  • Save leppie/3672419 to your computer and use it in GitHub Desktop.
Save leppie/3672419 to your computer and use it in GitHub Desktop.
GetLastChangesetNumber
using System;
using System.Text.RegularExpressions;
class Program
{
static int Main(string[] args)
{
string line = null;
while ((line = Console.ReadLine()) != null)
{
var m = Regex.Match(line, "^Changeset: (?<changeset>\\d+)$");
if (m.Success)
{
Console.WriteLine(m.Groups["changeset"].Value);
return 0;
}
}
return 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment