From 7afdaabc685df1968f4d7956c70ffc5ceffc36b1 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 16 Mar 2012 01:53:23 +0000 Subject: [PATCH] repo: Fix false 'Not everything is synced' messages after succesful conflict resolution --- SparkleLib/Git/SparkleRepoGit.cs | 2 +- SparkleLib/SparkleRepoBase.cs | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 9f902177..4e450ad6 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -132,7 +132,7 @@ namespace SparkleLib.Git { line [1].ToString ().Equals ("A")) { string path = line.Substring (3); - path = path.Trim ("\"".ToCharArray ()); + path = path.Trim ("\"".ToCharArray ()); file_paths.Add (path); } } diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index a2ced8f7..6ca60b5d 100755 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -325,9 +325,6 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Done"); this.server_online = true; - if (SyncStatusChanged != null) - SyncStatusChanged (SyncStatus.Idle); - if (!pre_sync_revision.Equals (CurrentRevision)) { List change_sets = GetChangeSets (1); @@ -340,8 +337,16 @@ namespace SparkleLib { // There could be changes from a resolved // conflict. Tries only once, then lets // the timer try again periodically - if (HasUnsyncedChanges) + if (HasUnsyncedChanges) { + if (SyncStatusChanged != null) + SyncStatusChanged (SyncStatus.SyncUp); + SyncUp (); + HasUnsyncedChanges = false; + } + + if (SyncStatusChanged != null) + SyncStatusChanged (SyncStatus.Idle); } else { SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Error");