diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index b8498a9d..cb08bc64 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -118,12 +118,10 @@ namespace SparkleLib { git.Start (); git.WaitForExit (); - if (git.ExitCode == 0) { + if (git.ExitCode == 0) return true; - } else { + else return false; - //FetchRebaseAndPush ();TODO - } } @@ -252,7 +250,6 @@ namespace SparkleLib { EnableWatching (); OnConflictResolved (); - RequestStatus (SyncStatus.SyncUp); } EnableWatching (); diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index d84544c1..34d51f6a 100644 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -164,6 +164,8 @@ namespace SparkleLib { protected void OnConflictResolved () { + HasUnsyncedChanges = true; + if (ConflictResolved != null) ConflictResolved (); } @@ -346,13 +348,6 @@ namespace SparkleLib { } - protected void RequestStatus (SyncStatus requested_status) - { - if (requested_status == SyncStatus.SyncUp) - SyncUpBase (); - } - - private void SyncUpBase () { try { @@ -416,8 +411,11 @@ namespace SparkleLib { if (SyncStatusChanged != null) SyncStatusChanged (SyncStatus.Idle); + // There could be changes from a + // resolved conflict if (HasUnsyncedChanges) SyncUp (); + } else { SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Error"); this.server_online = false;