From a1ba6f1b36e0ce9f2dfab48f9b3071b3f4cd7094 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 1 Mar 2011 23:42:00 +0000 Subject: [PATCH] [repo] Fix NewCommit event not being fired --- SparkleLib/SparkleRepo.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index fc50e100..861a7b7f 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -713,9 +713,9 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Rebasing changes..."); SparkleGit git = new SparkleGit (LocalPath, "rebase -v FETCH_HEAD"); - git.Exited += delegate { - + + Console.WriteLine ("EXITED"); if (Status.MergeConflict.Count > 0) { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict detected..."); @@ -755,19 +755,18 @@ namespace SparkleLib { Push (); } - - - _CurrentHash = Head.CurrentCommit.Hash; - - if (NewCommit != null) - NewCommit (GetCommits (1) [0], LocalPath); }; git.Start (); git.WaitForExit (); - + + _CurrentHash = Head.CurrentCommit.Hash; + + if (NewCommit != null) + NewCommit (GetCommits (2) [0], LocalPath); // FIXME: GetCommits doesn't like 1 + SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Changes rebased."); Watcher.EnableRaisingEvents = true; @@ -967,7 +966,7 @@ namespace SparkleLib { foreach (string log_entry in entries) { - Regex regex = new Regex (@"^commit ([a-z0-9]+)\n" + + Regex regex = new Regex (@"commit ([a-z0-9]+)\n" + "Author: (.+) <(.+)>\n" + "Date: ([0-9]{4})-([0-9]{2})-([0-9]{2}) " + "([0-9]{2}):([0-9]{2}):([0-9]{2}) \\+([0-9]{4})\n" +