diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 35cc046f..8826d6c8 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -265,7 +265,6 @@ namespace SparkleLib.Git { git.WaitForExit (); UpdateSizes (); - ChangeSets = GetChangeSets (); if (git.ExitCode == 0) { ClearCache (); @@ -337,13 +336,11 @@ namespace SparkleLib.Git { string identifier_file_path = Path.Combine (LocalPath, ".sparkleshare"); File.SetAttributes (identifier_file_path, FileAttributes.Hidden); - ChangeSets = GetChangeSets (); ClearCache (); return true; } else { - ChangeSets = GetChangeSets (); return false; } } diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index b342f0c1..bb8ec082 100755 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -282,10 +282,11 @@ namespace SparkleLib { if (SyncUp ()) { SparkleHelpers.DebugInfo ("SyncUp", Name + " | Done"); - HasUnsyncedChanges = false; - SyncStatusChanged (SyncStatus.Idle); + ChangeSets = GetChangeSets (); + + SyncStatusChanged (SyncStatus.Idle); this.listener.Announce (new SparkleAnnouncement (Identifier, CurrentRevision)); } else { @@ -320,21 +321,20 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("SyncDown", Name + " | Done"); ServerOnline = true; - if (!pre_sync_revision.Equals (CurrentRevision)) { - if (ChangeSets != null && - ChangeSets.Count > 0) { + ChangeSets = GetChangeSets (); - bool emit_change_event = true; - foreach (SparkleChange change in ChangeSets [0].Changes) { - if (change.Path.EndsWith (".sparkleshare")) { - emit_change_event = false; - break; - } + if (!pre_sync_revision.Equals (CurrentRevision) && ChangeSets != null && ChangeSets.Count > 0) { + bool emit_change_event = true; + + foreach (SparkleChange change in ChangeSets [0].Changes) { + if (change.Path.EndsWith (".sparkleshare")) { + emit_change_event = false; + break; } - - if (emit_change_event) - NewChangeSet (ChangeSets [0]); } + + if (emit_change_event) + NewChangeSet (ChangeSets [0]); } // There could be changes from a resolved @@ -353,6 +353,8 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("SyncDown", Name + " | Error"); ServerOnline = false; + ChangeSets = GetChangeSets (); + SyncStatusChanged (SyncStatus.Error); }