diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 08972064..e1b8d5e7 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -585,17 +585,19 @@ namespace SparkleLib { git.Exited += delegate { if (git.ExitCode != 0) { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict detected. Trying to get out..."); - this.watcher.EnableRaisingEvents = false; + DisableWatching (); while (AnyDifferences) ResolveConflict (); SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict resolved."); - this.watcher.EnableRaisingEvents = true; + EnableWatching (); SparkleEventArgs args = new SparkleEventArgs ("ConflictDetected"); if (ConflictDetected != null) ConflictDetected (this, args); + + Push (); } this.current_hash = GetCurrentHash (); @@ -773,6 +775,18 @@ namespace SparkleLib { } + public void DisableWatching () + { + this.watcher.EnableRaisingEvents = false; + } + + + public void EnableWatching () + { + this.watcher.EnableRaisingEvents = true; + } + + // Gets the domain name of a given URL private string GetDomain (string url) {