code_junkie

How can I view the changes made after a revision is committed and parse it for comments?

Nov 12th, 2011
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. SvnHookArguments ha;
  4. if (!SvnHookArguments.ParseHookArguments(args, SvnHookType.PostCommit, false, out ha))
  5. {
  6. Console.Error.WriteLine("Invalid arguments");
  7. Environment.Exit(1);
  8. }
  9.  
  10. using (SvnLookClient cl = new SvnLookClient())
  11. {
  12. SvnChangeInfoEventArgs ci;
  13. cl.GetChangeInfo(ha.LookOrigin, out ci);
  14.  
  15. // ci contains information on the commit e.g.
  16. Console.WriteLine(ci.LogMessage); // Has log message
  17.  
  18. foreach(SvnChangeItem i in ci.ChangedPaths)
  19. {
  20. //
  21. }
  22. }
  23. }
Add Comment
Please, Sign In to add comment